Next: Data structures
Up: User's Guide
Previous: Basic algebraic categories
  Contents
  Index
For efficiency reasons,
defines Integer to be SALLI's GMPInteger.
This means that programs using
must be linked with GMP 3.0 or 3.1,
and that you cannot run
in the compiler interactive loop.
On the other hand, several of GMP's low-level functions are exported
by Integer and the other ones can be called safely
on elements of Integer. Similarly,
defines Float
to be SALLI's GMPFloat. Of course, the machine types
MachineInteger,
SingleFloat and
DoubleFloat
remain available in
, and it is in fact recommended to use
MachineInteger wherever appropriate,
in particular for loop
or data structure indices. Conversions between
MachineInteger
and Integer are provided by coerce
and machine.
provides two different implementations of the finite field
when
is a machine prime: SmallPrimeField provides a
standard implementation, while ZechPrimeField provides
a significantly faster implementation based on a logarithmic
representation of its elements.
However, ZechPrimeField
precomputes a table of size
so it should only be used
for reasonably small values of
and when a significant amount
of calculations in
are made following the creation
of the type (we have found the precomputation time to be under one second
for
around
on recent workstations).
The type Fraction
implements the fraction field of
the GcdDomain
. Typical arguments are Integer
(to get the rational numbers) or polynomial types. Note that fractions
are automatically normalized after each arithmetic operation.
Next: Data structures
Up: User's Guide
Previous: Basic algebraic categories
  Contents
  Index
Manuel Bronstein
2000-12-13