[back] [prev] [next] [index] [root]

 


Prec

Sets and gets the precision for real and complex computations in the shell.

Syntax:

Prec(n);
Prec();

integer
  n  

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.


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]