Jump to content

Talk:IEEE 754: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
There are no NaNs in a total arithmetic.
Line 7: Line 7:
The SPIE paper listed at the end of this message sets out a total arithmetic called "transrational arithmetic" that does not have NaNs. In other words, all arithmetical operations are defined in this arithmetic. Total versions of all of the standard arithmetics - integer, rational, real, complex, quaternion, and octonion - are readily derived. The total arithmetics include the corresponding standard arithmetics as sub-sets. So all existing computations can be done using a total arithmetic.
The SPIE paper listed at the end of this message sets out a total arithmetic called "transrational arithmetic" that does not have NaNs. In other words, all arithmetical operations are defined in this arithmetic. Total versions of all of the standard arithmetics - integer, rational, real, complex, quaternion, and octonion - are readily derived. The total arithmetics include the corresponding standard arithmetics as sub-sets. So all existing computations can be done using a total arithmetic.


The arithmetics are made total by replacing the multiplicative inverse with the reciprocal and by defining that the number 0/0 lies off the real-number line. The reciprocal contains the multiplicative inverse as a proper sub-set, but allows reciprocals of zero, positive and minus infinity, and of the number 0/0 which is called “nullity” in the cited and related papers. The use of the reciprocal avoids the contradictions that usually arise in algebra when division by zero is allowed. The topology of having 0/0 lie off the real-number line avoids the contradictions that usually arise in real analysis (calculus) when division by zero is allowed to take on a fixed value. There are no known contradictions in the total arithmetics and work is going on to produce machine assisted proofs of consistency.
The arithmetics are made total by replacing the multiplicative inverse with the reciprocal and by defining that the number 0/0 lies off the real-number line. The reciprocal contains the multiplicative inverse as a proper sub-set, but allows reciprocals of zero, positive and minus infinity, and of the number 0/0 which is called “nullity” (<math>\Phi</math>) in the cited and related papers. The use of the reciprocal avoids the contradictions that usually arise in algebra when division by zero is allowed. The topology of having 0/0 lie off the real-number line avoids the contradictions that usually arise in real analysis (calculus) when division by zero is allowed to take on a fixed value. There are no known contradictions in the total arithmetics and work is going on to produce machine assisted proofs of consistency.


Transrational arithmetic, and its kin, make NaN obsolete. However, it would be possible to modify the semantics of NaN so that they are compatible with the transarithmetics. This would give rise to a version of floating-point arithmetic that returns a fixed, numerical solution in every case. This would make it easier for programmers to handle cases that are currently considered to be NaN.
Transrational arithmetic, and its kin, make NaN obsolete. However, it would be possible to modify the semantics of NaN so that they are compatible with the transarithmetics. This would give rise to a version of floating-point arithmetic that returns a fixed, numerical solution in every case. This would make it easier for programmers to handle cases that are currently considered to be NaN.

Revision as of 18:19, 18 February 2006

There is an interesting paper that addresses expression evaluation in MSVC++. I'm not quite sure which page it should go on:

Jake 22:07, 26 Oct 2004 (UTC)

There are no NaNs in a total arithmetic.

The SPIE paper listed at the end of this message sets out a total arithmetic called "transrational arithmetic" that does not have NaNs. In other words, all arithmetical operations are defined in this arithmetic. Total versions of all of the standard arithmetics - integer, rational, real, complex, quaternion, and octonion - are readily derived. The total arithmetics include the corresponding standard arithmetics as sub-sets. So all existing computations can be done using a total arithmetic.

The arithmetics are made total by replacing the multiplicative inverse with the reciprocal and by defining that the number 0/0 lies off the real-number line. The reciprocal contains the multiplicative inverse as a proper sub-set, but allows reciprocals of zero, positive and minus infinity, and of the number 0/0 which is called “nullity” () in the cited and related papers. The use of the reciprocal avoids the contradictions that usually arise in algebra when division by zero is allowed. The topology of having 0/0 lie off the real-number line avoids the contradictions that usually arise in real analysis (calculus) when division by zero is allowed to take on a fixed value. There are no known contradictions in the total arithmetics and work is going on to produce machine assisted proofs of consistency.

Transrational arithmetic, and its kin, make NaN obsolete. However, it would be possible to modify the semantics of NaN so that they are compatible with the transarithmetics. This would give rise to a version of floating-point arithmetic that returns a fixed, numerical solution in every case. This would make it easier for programmers to handle cases that are currently considered to be NaN.

The transarithmetics define that a number has exactly one of four signs: negative, zero, positive, or nullity. It would require two bits to encode all of these signs explicitly.

A minimal change to the standard would be to correct the semantics of NaN. A more radical change would be to incorporate the four-state representation of sign. Further developments would be possible, but are probably premature.

The community is aware of the unsatisfactory semantics of NaN and might welcome a coherent treatment of the arithmetical exceptions that give rise to NaN.

http://www.bookofparagon.com/Mathematics/PerspexMachineVII.pdf

http://www.bookofparagon.com/Mathematics/PerspexMachineVII.Poster.pdf

mailto:james.anderson@reading.ac.uk