"Bill Page" <[EMAIL PROTECTED]> writes:
[...] | > | These rational values always have an exact representation in the | > | domain Fraction Integer and form a specific subset of the real | > | numbers. Among other things, this makes equality in Float fully | > | transitive, where as in some other floating point systems this might | > | not be the case. | > | > I do not understand what you mean by that. In the IEEE's system, | > -0 compare equal to +0. The only way you get the sign is when you | > ask for it. | > | | You are right and I was wrong. | | As one can see from the above code, Axiom works with an arbitrarily | set fixed precision represented by 'bits()' and equality is defined in | terms of 'zero? (x - y)'. The result of - depends on the value of | 'bits()' and is therefore ultimately non-transitive | | a = b and b = c does not imply a = c | | for some values of a, b and c. equality is not transitive if you take into account NaNs, but that is bit what I had in mind... | > | Simiarly, %plusInfinity and %minusInfinity are not | > | values in Float. | > | | > | IEEE floats however are something different - wouldn't you agree? | > | > It is as different as short integer is different from long long | > interger :-) Note that floating point systems are parameterized, and | > not all of them are algebraically closed. The IEEE system, as an | > algebra, is closed. | > | | But as an algebra what axioms does it obey? The distinctive ones are the laws governing the projections (rounding modes) -- see Goldberg's tutorial. | | > | What I was supposing is the maybe the domain DoubleFloat (which | > | currently looks more or less just like a fixed precision version of | > Float) should be given semantics that more closely resembles | > IEEE 754. | > | > In OpenAxiom, DoubleFloat is supposed to reflect a (64-bit) double | > precision IEEE-754 floating point datatype. Only Lisp mis abstractions | > get in the way; but thankfully SBCL and ECL provides some (limited) | > ways to get around thise over abstractions. | > | | So, would it be a good idea to make Axiom domain Float also conform | to IEEE 754? IEEE 754 defines fixed precision floating point system. I'm not sure I want that for Float (which is trying to implement arbitrary precision floating point systems). -- Gaby ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel