File: intro.book.txt

package info (click to toggle)
yacas 1.3.6-2
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 7,176 kB
  • ctags: 3,520
  • sloc: cpp: 13,960; java: 12,602; sh: 11,401; makefile: 552; perl: 517; ansic: 381
file content (168 lines) | stat: -rw-r--r-- 5,799 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
*BLURB 
This document gives a short introduction to Yacas.
Included is a brief tutorial on the syntax and some
commands to get you started using Yacas. There are also some examples.
				Introduction to the off-line version of Yacas

			Getting started with Yacas off-line

		Introduction

This section describes how to get started with {Yacas} locally by downloading and compiling the
program. However, this is not strictly necessary. You can also go online to our web site and
use {Yacas} in there inside your browser. The web page contains tutorials, example calculations 
and lots of documentation. This document is only useful if you plan to build and install {Yacas}
yourself.



		Installing {Yacas}

Read the file {INSTALL} for instructions on how to compile {Yacas}. {Yacas} is
portable across most Unix-ish platforms and requires only a standard C++
compiler such as {g++}.

The base {Yacas} application accepts text as input and returns text as output.
This makes it rather platform-independent. Apart from Unix-like systems, {Yacas} has been
compiled on Windows and on EPOC32, aka Psion (which doesn't come with a standard C++
library!).
The source code to compile {Yacas} for Windows can be found at the
<*Sourceforge repository|http://sourceforge.net/projects/yacas/*>.

For Unix, compilation basically amounts to the standard sequence

	./configure
	make
	make install
This will install the binaries to {/usr/local/bin} and the library files to {/usr/local/share/yacas/}.

*A getting printed manuals
Additionally, $LaTeX$-formatted documentation in PostScript and PDF formats can be produced by the command

	make texdocs

or, alternatively, by passing {--enable-ps-doc} or {--enable-pdf-doc}
to {./configure} when building {Yacas}. In the latter case, the documentation
will be automatically rebuilt every time the documentation changes (which is
useful when maintaining the documentation).

In addition, there is also a Java version of the lower-level interpreter. The code
for this Java version can be found in the directory "JavaYacas", and can be compiled
with the make file "makefile.yacas", by typing in:

	make -f makefile.yacas

The interpreter can then be invoked from the command line
with:

	java -jar yacas.jar

or alternatively it can be invoked as an applet, by opening
yacasconsole.html. 

The binary files that comprise the entire binary release
for the Java version are:

*	1. yacas.jar - the Java class files in one jar file.
*	2. yacasconsole.html - the file that launches the applet.
*	3. hints.txt - the hints that are shown in the applet
(the grey box with commands that match what you are typing in 
at that moment).

The Java version has almost all the features the C++ version
has. In fact, there is no reason the Java version should not
have all the same features. Not all command line arguments
are available yet, and the command line prompt does not have the
history yet.


		Using the console mode

You can run {Yacas} in the console mode simply by typing {yacas}. The {Yacas} command prompt looks like this:
	In>
and {Yacas}'s answers appear after the prompt
	Out>

*A {Exit}
*A {quit}
*A {^}{C}
A {Yacas} session may be terminated by typing {Exit()} or {quit}. Pressing {^}{C}
will also quit {Yacas}; however, pressing {^}{C} while {Yacas} is busy with a
calculation will stop just that calculation. A session can be restarted
(forgetting all previous definitions and results) by typing
*A {restart}
	restart

Typically, you would enter one statement per line, for example

	In> Sin(Pi/2);
	Out> 1;

Statements should end with a semicolon ({;}) although this is not required
in interactive sessions
({Yacas} will append a semicolon at end of line to finish the statement).

*A {Example}
Type {Example();} to get some random examples of {Yacas} calculations.

*A command history
The command line has a history list, so it should be easy to
browse through the expressions you entered previously using the Up and Down arrow keys.

When a few characters have been typed, the command line will use
the characters before the cursor as a filter into the history,
and allow you to browse through all the commands in the history
that start with these characters quickly, instead of browsing through
the entire history. 

*A TAB completion
Typing the first few characters of a previous expression and then
hitting the TAB key makes {Yacas} recall the last expression
in the history list that matches these first characters.

*A multi-line commands
Commands spanning multiple lines can (and actually have to) be entered by using a trailing backslash {\} at end of each continued line. For example:

	In> a:=2+3+
	Error on line 1 in file [CommandLine]
	Line error occurred on:
	>>>
	Error parsing expression

	In> a:=2+3+ \
	In> 1
	Out> 6;
The error after our first attempt occurred because {Yacas} has appended a semicolon at end of the first line and {2+3+;} is not a valid {Yacas} expression.

Incidentally, any text {Yacas} prints without a prompt is either messages printed by functions as their side-effect, or error messages. Resulting values of expressions are always printed after an {Out>}  prompt.





			Examples

This is a small tour of the capabilities {Yacas} currently offers. Note
that this list of examples is far from complete. {Yacas} contains a few
hundred commands, of which only a few are shown here.

Additional example calculations including the results can be found
here:

*	A selection of calculations from the <*Wester benchmark|yacasdoc://essays/2/*>.
*	Some additional <*example calculations|mybench2.html*> that {Yacas} can currently perform.



		Using Yacas from the console

	    Command-line options

*INCLUDE cl-options.chapt

*INCLUDE config.chapt

*INCLUDE addons.chapt

*REM GNU Free Documentation License
*INCLUDE FDL.chapt