std.complex

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Wed Jan 1 06:25:20 PST 2014


On Tuesday, 26 November 2013 at 21:11:25 UTC, David Nadlinger 
wrote:
> IEEE 754 includes infinity as an actual value, contrary to the 
> usual definition of real numbers in mathematics.

A bit late, but AFAIK inf represents either overflow or N/0... 
And 0 represents either underflow or zero. Computations on those 
values should be conservative unless you trap overflow/underflow 
exceptions and handle those as special cases. You want to 
preserve overflow... Then you have the denormal numbers 
(underflow where you retain some digits). It is tempting to think 
of FP as real numbers, but they are not, of course, so libraries 
should IMO be conservative.


More information about the Digitalmars-d mailing list