wrong rounding

via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 2 02:53:03 PDT 2015


On Monday, 1 June 2015 at 22:24:31 UTC, John Colvin wrote:
> Nonetheless, surely in this case the values should be the same 
> regardless of the integer target type, no?

Not sure... the spec says that the compiler is allowed to do 
intermediate computations at higher precision, but it doesn't say 
it is required to. So, strictly speaking, its at the compiler's 
discretion to use higher precision when rounding to `int` than 
when rounding to `ulong`...


More information about the Digitalmars-d mailing list