Convert double to long if lossless

Ali Çehreli acehreli at yahoo.com
Tue Jan 19 18:58:47 UTC 2021


On 1/19/21 10:28 AM, Per Nordlöw wrote:

 > On Tuesday, 19 January 2021 at 16:14:17 UTC, drug wrote:
 >>>    https://dlang.org/phobos/std_bitmanip.html#FloatRep
 >
 > Doesn't this pattern already cover all possible cases of `value` needed?

I think so. I just remembered FloatRep as a cleaner tool compared to 
shifting bits explicitly.

Ali




More information about the Digitalmars-d-learn mailing list