about float & double
dennis luehring
dl.soluz at gmx.net
Wed Jan 19 04:37:07 PST 2011
> Is there somewhere a (clear) doc about float/double internals?
> Some more particuliar questions:
>
> What is the internal bit layout? (mantissa, sign, exponent)
>
> Can I assume the "integral range" is [-2^(m-1) .. 2^â�œm-1)-1], where m is
> the number of mantissa bits?
>
> What are the values used to represent thingies like NaNs, inf, error?
> (Or are there not represented as values?)
>
> How would you get a float's integral and fractional parts without
> performing arithmetic? (I think at bit ops, indeed)
Wikipedia is very informative
and the phobos math implementation is a very good source for the bit ops
stuff
http://www.dsource.org/projects/phobos/browser/trunk/phobos/std/math.d
More information about the Digitalmars-d-learn
mailing list