a way to specily floating-point numbers as bit patters

Nicholas Wilson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 9 15:51:30 PDT 2017


On Friday, 9 June 2017 at 16:56:46 UTC, ketmar wrote:
> Petar Kirov [ZombineDev] wrote:
>
>> Do HexFloats (http://dlang.org/spec/lex#HexFloat) help?
>
> hm. i somehow completely missed "%a" format specifier! yeah, 
> "-0x1.55556ep-3" did the trick.
>
> tnx. i should do my homework *before* posting big rants, lol.

There's also FloatRep in std.bitmanip.


More information about the Digitalmars-d-learn mailing list