JuliaLang/julia — pull request #3149 by andrioni (2013-05-19 10:17:57+00:00)
Title: RFC: Ability to change rounding mode for all floats (cf. #2976)

This adds three new functions (`get_rounding`, `set_rounding` and `with_rounding`) which allow users to change the rounding direction of floating point arithmetic (both Float32 and Float64). I've also changed the behavior of the old BigFloat rounding functions to agree with this new one, which I find much more intuitive and safe (see `tests/rounding.jl` for examples in the case of Float32/Float64).

I haven't tested this yet on Windows, and it probably shouldn't work, as it depends on the `fenv.h` header which is only available in C99 or POSIX systems, but I don't know how mingw works..