std.math: FloatingPointControl option to round to nearest + tie away from zero

Shriramana Sharma via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 10 21:25:03 PST 2015


https://en.wikipedia.org/wiki/IEEE_floating_point#Roundings_to_nearest says 
that IEEE 754 provides two options for rounding to nearest: ties to even and 
ties away from zero. 

However, under https://github.com/D-Programming-Language/phobos/blob/master/std/math.d#L4539 we have only one roundToNearest 
which, I presume, ties to even.

Is there a difficulty in providing the option for tieing away from zero?

Thanks.

-- 
Shriramana Sharma, Penguin #395953


More information about the Digitalmars-d mailing list