Real Close to the Machine: Floating Point in D

bearophile bearophileHUGS at lycos.com
Fri May 8 17:02:39 PDT 2009


Thanks to Don for the very nice explanation. I'll need more time to digest it all.

I can see that D2 is one of the best (maybe the best at the moment) language regarding its management of floating point values. This means that people interested in doing numerical FP computations may become interested in D2. But for them D may enjoy becoming a bit less "system language" and a bit more "scientific language", especially regarding tiling loops, matrix and domain management, automatic management of some data parallelism that is currently nearly totally absent, etc. (see Chapel language).


>A more advanced usage, not yet supported on any platform(!) is to provide a nested function to be used as a hardware exception handler.<

I didn't know this.


>real NaN(ulong payload) -- create a NaN with a "payload", where the payload is a ulong.<

- How many bit can reliably be stored there?
- That function returns a real, but can payloads can be stored in doubles too?
- If doubles too can be used, how many bits long can be such payload?
- Can Don give me one or two example usages of such payloads? (I have never seen them used so far in any language.)

Bye and thank you,
bearophile



More information about the Digitalmars-d mailing list