a way to specily floating-point numbers as bit patters

Honey via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 9 09:41:01 PDT 2017


On Friday, 9 June 2017 at 16:34:28 UTC, ketmar wrote:
>> Try -0.16666685f.
>
> it doesn't matter if i can find the decimal representation for 
> the given bit pattern or not. the whole post is about removing 
> the need to rely on lossy binary->decimal->binary conversions.

Lossless turn-around is guaranteed if you are using sufficiently 
many digits. In case of IEEE-754 single precision it's 8 
significant decimal digits.


More information about the Digitalmars-d-learn mailing list