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.41421356237309504880168872420969807856967187537694807317...Function
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.
8
setmod_ff
by specifying its characteristic p and an irreducible polynomial
of degree n over GF(p). An element of this field
is represented by a polynomial over GF(p) modulo m(x).
9
setmod_ff
by specifying its characteristic p the extension degree
n. If p is less than 2^14, each non-zero element
of this field
is a power of a fixed element, which is a generator of the multiplicative
group of the field, and it is represented by its exponent.
Otherwise, each element is represented by the redue modulo p.
This specification is useful for treating both cases in a single
program.
10
setmod_ff
by specifying its characteristic p the extension degree
n and m=[K:F]. An irreducible polynomial of degree m
over K is automatically generated and used as the defining polynomial of
the generator of the extension K/F. The generator is denoted by @s
.
11
Finite fields other than small finite prime fields are
set by setmod_ff
.
Elements of finite fields do not have informations about the modulus.
Upon an arithmetic operation, i
f 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.