File: const.chapt.txt

package info (click to toggle)
yacas 1.3.6-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • 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 (234 lines) | stat: -rw-r--r-- 5,291 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234


			Yacas-specific constants

*CMD % --- previous result
*CORE
*CALL
	%

*DESC

{%} evaluates to the previous result on the command line. {%} is a global
variable that is bound to the previous result from the command line.
Using {%} will evaluate the previous result. (This uses the functionality
offered by the {SetGlobalLazyVariable} command).

Typical examples are {Simplify(%)} and {PrettyForm(%)} to simplify and show the result in a nice
form respectively.

*E.G.

	In> Taylor(x,0,5)Sin(x)
	Out> x-x^3/6+x^5/120;
	In> PrettyForm(%)
	
	     3    5
	    x    x
	x - -- + ---
	    6    120
	
	

*SEE SetGlobalLazyVariable

*CMD True --- boolean constant representing true
*CMD False --- boolean constant representing false
*CORE
*CALL
	True
	False

*DESC

{True} and {False} are typically a result
of boolean expressions such as {2 < 3} or {True And False}.

*SEE And, Or, Not

*CMD EndOfFile --- end-of-file marker
*CORE
*CALL
	EndOfFile

*DESC

End of file marker when reading from file. If a file
contains the expression {EndOfFile;} the
operation will stop reading the file at that point.

			Mathematical constants

*CMD Infinity --- constant representing mathematical infinity
*STD
*CALL
	Infinity

*DESC

Infinity represents infinitely large values. It can be the result of certain
calculations.

Note that for most analytic functions Yacas understands {Infinity} as a positive number.
Thus {Infinity*2} will return {Infinity}, and {a < Infinity} will evaluate to {True}.

*E.G.

	In> 2*Infinity
	Out> Infinity;
	In> 2<Infinity
	Out> True;

*CMD Pi --- mathematical constant, $pi$

*STD
*CALL
	Pi

*DESC

Pi symbolically represents the exact value of $pi$. When the {N()} function is
used, {Pi} evaluates to a numerical value according to the current precision.
It is better to use {Pi} than {N(Pi)} except in numerical calculations, because exact
simplification will be possible.

This is a "cached constant" which is recalculated only when precision is increased.

*E.G.

	In> Sin(3*Pi/2)
	Out> -1;
	In> Pi+1
	Out> Pi+1;
	In> N(Pi)
	Out> 3.14159265358979323846;

*SEE Sin, Cos, N, CachedConstant

*CMD Undefined --- constant signifying an undefined result
*STD
*CALL
	Undefined

*DESC

{Undefined} is a token that can be returned by a function when it considers
its input to be invalid or when no meaningful answer can be given. The result is then "undefined".

Most functions also return {Undefined} when evaluated on it.

*E.G.

	In> 2*Infinity
	Out> Infinity;
	In> 0*Infinity
	Out> Undefined;
	In> Sin(Infinity);
	Out> Undefined;
	In> Undefined+2*Exp(Undefined);
	Out> Undefined;

*SEE Infinity




*CMD GoldenRatio --- the Golden Ratio
*STD
*CALL
	GoldenRatio

*DESC

These functions compute the "golden ratio"
$$phi <=> 1.6180339887 <=> (1+Sqrt(5))/2 $$.

The ancient Greeks defined the "golden ratio" as follows:
If one divides a length 1 into two pieces $x$ and $1-x$, such that the ratio of 1 to $x$ is the same as the ratio of $x$ to $1-x$, then $1/x <=> 1.618$... is the "golden ratio".


The constant is available symbolically as {GoldenRatio} or numerically through {N(GoldenRatio)}.
This is a "cached constant" which is recalculated only when precision is increased.
The numerical value of the constant can also be obtained as {N(GoldenRatio)}.


*E.G.

	In> x:=GoldenRatio - 1
	Out> GoldenRatio-1;
	In> N(x)
	Out> 0.6180339887;
	In> N(1/GoldenRatio)
	Out> 0.6180339887;
	In> V(N(GoldenRatio,20));

	CachedConstant: Info: constant GoldenRatio is
	being recalculated at precision 20 
	Out> 1.6180339887498948482;


*SEE N, CachedConstant


*CMD Catalan --- Catalan's Constant
*STD
*CALL
	Catalan

*DESC

These functions compute Catalan's Constant $Catalan<=>0.9159655941$.

The constant is available symbolically as {Catalan} or numerically through {N(Catalan)} with {N(...)} the usual operator used to try to coerce an expression in to a numeric approximation of that expression.
This is a "cached constant" which is recalculated only when precision is increased.
The numerical value of the constant can also be obtained as {N(Catalan)}.
The low-level numerical computations are performed by the routine {CatalanConstNum}.


*E.G.

	In> N(Catalan)
	Out> 0.9159655941;
	In> DirichletBeta(2)
	Out> Catalan;
	In> V(N(Catalan,20))

	CachedConstant: Info: constant Catalan is
	being recalculated at precision 20
	Out> 0.91596559417721901505;


*SEE N, CachedConstant

*CMD gamma --- Euler's constant $gamma$
*STD
*CALL
	gamma

*DESC

These functions compute Euler's constant $gamma<=>0.57722$...

The constant is available symbolically as {gamma} or numerically through using the usual function {N(...)} to get a numeric result, {N(gamma)}.
This is a "cached constant" which is recalculated only when precision is increased.
The numerical value of the constant can also be obtained as {N(gamma)}.
The low-level numerical computations are performed by the routine {GammaConstNum}.

Note that Euler's Gamma function $Gamma(x)$ is the capitalized {Gamma} in Yacas.

*E.G.

	In> gamma+Pi
	Out> gamma+Pi;
	In> N(gamma+Pi)
	Out> 3.7188083184;
	In> V(N(gamma,20))
	
	CachedConstant: Info: constant gamma is being
	  recalculated at precision 20 
	GammaConstNum: Info: used 56 iterations at
	  working precision 24 
	Out> 0.57721566490153286061;

*SEE Gamma, N, CachedConstant