Mill Computing, Inc. Forums The Mill Architecture Floating Point Rounding Reply To: Floating Point Rounding

Witold Baryluk
Participant
Post count: 33

Kahan is wrong 🙂 I hope it was just a joke.

I think the intention is that, if you use /Qlfist, then you make sure to manually set rounding modes in relevant code (to chop, so the FIST comforms to C semantic of float to int conversion), or in main, and you are aware that this also will change normal floating point operations rounding (but that is of much smaller importance in many cases). This way the code emitted by compiler doesn’t change rounding modes all the time, and you are supposed to make sure that the modes are correct instead.

Anyway, fortunately modern machines, have better facilities for dealing with the problem (FISTTP and CVTTSS2SI).