axiom-developer
[Top][All Lists]

## [Axiom-developer] [#167 Infinite Floats Domain] Float and DFloat

 From: wyscc Subject: [Axiom-developer] [#167 Infinite Floats Domain] Float and DFloat Date: Mon, 13 Jun 2005 08:08:55 -0500

```Changes
http://page.axiom-developer.org/zope/mathaction/167InfiniteFloatsDomain/diff
--

??changed:
-\$m\$ has 53 bits stored in a 52 bit field (not including sign, note that in
base 2, the most significant digit normalized must be 1, so no need to store
it!) and \$e\$ has 11 bits (including sign, ranging from \$-1075\$ to \$971\$ which
accounts for an offset of 53 because the base point location). This is exactly
equivalent to the IEEE-754 standard for 64 bit floating point. The actual
arithmetics is done via Lisp, which I assume calls the hardware.
-
-In 'FLOAT', conceptually the infinite precision floating point system, is
basically also finite precision floating point system, with the ability to
increase precision as requested. However, this promotion is not automatic. In
other words, every 'FLOAT' number has its own precision, implicit in the length
of its mantissa. In effect, 'FLOAT' is the union of floating point systems with
various precisions, but without any coercion between them. So Tim is not
entirely wrong is saying we don't have infinite precision floating point in the
spirit of INT. The real question for the developers is then:
\$m\$ has 53 bits stored in a 52 bit field (not including sign, note that in base
2, the most significant digit normalized must be 1, so no need to store it!)
and \$e\$ has 11 bits (including sign, ranging from \$-1075\$ to \$971\$ which
accounts for an offset of 53 because the base point location). This is exactly
equivalent to the IEEE-754 standard for 64 bit floating point. The actual
arithmetic operations are done via Lisp, which I assume calls the hardware.

In 'FLOAT', conceptually the infinite precision floating point system, is
basically also finite precision floating point system, with the ability to
increase precision as requested. However, this promotion is not automatic. In
other words, every 'FLOAT' number has its own precision, implicit in the length
of its mantissa. In effect, 'FLOAT' is the union of floating point systems with
various precisions, but without exact arithmetic. So Tim is not entirely wrong
in saying we don't have infinite precision floating point in the spirit of INT.
The real question for the developers is then:

??changed:
-Example. Addition of two 'FLOAT' with different orders of magnitude will not
your point of view: if the precision of the number is important, then this is
correct. If exact arithmetic with floating point is what you want, this is not
correct.
Example. Addition of two 'FLOAT' with different orders of magnitude will not
your point of view: if the precision of the numbers are important, then this
example is correctly handled in Axiom. If exact arithmetic with floating point
is what you want, this is not correct.

--