Change floating point rounding mode

Viewed 14804

What is the most efficient way to change the rounding mode* of IEEE 754 floating point numbers? A portable C function would be nice, but a solution that uses x86 assembly is ok too.

*I am referring to the standard rounding modes of towards nearest, towards zero, and towards positive/negative infinity

2 Answers
Related