log2 buggy or is a real thing?

Timon Gehr timon.gehr at gmx.ch
Wed Apr 4 09:53:48 PDT 2012


On 04/04/2012 05:15 PM, Don Clugston wrote:
>
> I don't think so. For 80-bit reals, every long can be represented
> exactly in an 80 bit real, as can every ulong from 0 up to and including
> ulong.max - 1. The only non-representable built-in integer is ulong.max,
> which (depending on rounding mode) gets rounded up to ulong.max+1.
>

?

assert(0xffffffffffffffffp0L == ulong.max);
assert(0xfffffffffffffffep0L == ulong.max-1);


More information about the Digitalmars-d-learn mailing list