[back] [prev] [next] [index] [root]
Prec
Sets and gets the precision for real and complex
computations in the shell.
Syntax:
Prec(n);
Prec();
See also: OrderPrec
Description:
All real and complex computations in the shell are performed in a
global precision. The Prec function sets and gets this
global precision. Remark that the global precision has no
influence at all on computations done in internal KANT
functions. The only way to set this is using OrderPrec.
- [ Prec(n)] Sets the global precision to n and returns the
new global precision. This is the smallest positive integer which
is divisible by 4 and greater than or equal to max( n, 12).
- [ Prec()] Returns the current global precision.
Example:
Compute Euler's constant with different precisions:
kash> e;
2.718281828459045235360287471352662497757247093699
kash> Prec(100);
100
kash> e;
2.7182818284590452353602874713526624977572470936999595749669676277240766303535\
47594571382178525166
<- back[back] [prev] [next] [index] [root]