How to format float unambiguously?
Ali Çehreli
acehreli at yahoo.com
Wed Sep 1 01:15:19 UTC 2021
[Sorry for the double-post Nic.]
On 8/31/21 5:31 PM, Nicholas Wilson wrote:
> On Tuesday, 31 August 2021 at 17:53:12 UTC, deadalnix wrote:
>> When formatting floats, as far as I can tell, one either has to pick
the whole decimal gallery, or accept that the end result might be ambiguous.
>
> I don't know what your use case is but have you tried %a which
formats it as a hex float?
I was going to suggest the same but because I did not understand
anything about the question I kept it to myself. :) (What is ambiguous
about 1 or 1.000000? :) )
I use %a to show differences at bit level between two executions, which
should produce the same bit result.
Ali
More information about the Digitalmars-d
mailing list