Go to the first, previous, next, last section, table of contents.
0
1
ctrl()
command.
[0] 1.2; 1.2 [1] 1.2e-1000; 0 [2] ctrl("bigfloat",1); 1 [3] 1.2e-1000; 1.20000000000000000513 E-1000A rational number shall be converted automatically into a double float number before the operation with another double float number and the result shall be computed as a double float number.
2
3
ctrl()
command.
The default precision is about 9 digits, which can be specified by
setprec()
command.
[0] ctrl("bigfloat",1); 1 [1] eval(2^(1/2)); 1.414213562373095048763788073031 [2] setprec(100); 9 [3] eval(2^(1/2)); 1.41421356237309504880168872420969807856967187537694807317654396116148Function
eval()
evaluates numerically its argument as far as
possible.
Notice that the integer given for the argument of setprec()
does
not guarantee the accuracy of the result,
but it indicates the representation size of numbers with which internal
operations of PARI are performed.
(See section eval
, deval
, section pari
.)
4
a+b*@i
, where @i is the unit of imaginary number, and a
and b
are either a rational number, double float number or
bigfloat number, respectively.
The real part and the imaginary part of a complex number can be
taken out by real()
and imag()
respectively.
5
setmod()
.
6
simp_ff
to an integer.
7
@
@
represents t mod f in F=GF(2)[t](f(t)).
By using @
one can input an element of F. For example
@^10+@+1
represents an element of F.
ptogf2n
ptogf2n
converts a univariate polynomial into an element of F.
ntogf2n
0x
prefix) and binary (0b
prefix) formats.
micellaneous
simp_ff
is available if one wants to convert the whole
coefficients of a polynomial.
The characteristic of a large finite prime field and the defining
polynomial of a finite field of characteristic 2 are set by setmod_ff
.
Elements of finite fields do not have informations about the modulus.
Upon an arithmetic operation, the modulus set by setmod_ff
is
used. If one of the operands is a rational number, it is automatically
converted into an element of the finite field currently set and
the operation is done in the finite field.
Go to the first, previous, next, last section, table of contents.