Machine Floats
Axiom provides two kinds of floating point numbers. The domain
Float
(abbreviation FLOAT)
implements a model of arbitrary precisions floating point numbers. The
domain
DoubleFloat
(abbreviation DFLOAT)
is intended to make available hardware floating point arithmetic in Axiom.
The actual model of floating point
DoubleFloat that Axiom
provides is system dependent. For example, on the IBM System 370, Axiom
uses IBM double precision which has fourteen hexadecimal digits of
precision or roughly sixteen decimal digits. Arbitrary precision floats
allow the user to specify the precision at which arithmetic operations
are computed. Although this is an attractive facility, it comes at a cost.
Arbitrary precision floating point arithmetic typically takes twenty to
two hundred times more time than hardware floating point.
By default, floating point numbers that you enter into Axiom are of type
Float.
You must therefore tell Axiom that you want to use
DoubleFloat values and operations. The
following are some conservative guidelines for getting Axiom to use
DoubleFloat.
To get a value of type DoubleFloat.,
use a target with
"@", ...
a conversion,...
or an assignment to a declared variable. It is more efficient if you
use a target rather than an explicit or implicit conversion.
You also need to declare functions that work with
DoubleFloat.
Use package calling for operations from
DoubleFloat
unless the arguments themselves are already of type
DoubleFloat.
By far, the most common usage of
DoubleFloat
is for functions to be graphied. For more information about Axiom's
numerical and graphical facilities, see
Graphics
in section 7,
Numeric Functions
in section 8.1, and
Float
The usual arithmetic and elementary functions are available for
DoubleFloat. Use
to get a list of operations.