Floating point rounding modes: we should restrict them slightly

#ponce aliloko at gmail.com
Thu Sep 10 01:36:50 PDT 2009


Why not imposing a rounding mode (ex :  toward minus infinity) ?
And then disallowing to change it in assembly.

I mean, you can still do :
  round(x) as floor(x + 0.5L)
  ceil(x) as floor(x + 1.0L)

Iit would cost some precision with large floating-point number, but not much since rounding such large numbers has few meaning.

It would clear up the rounding-mode mess a bit.



More information about the Digitalmars-d mailing list