sbv
sbv copied to clipboard
Consider generating C-code for FP ops with different rounding modes
Right now, we only support constant rounding mode roundNearestTiesToEven when we generate C code from floating point ops. It might be interesting to support other rounding modes as well, at least when the rounding mode is some other known constant.
There's some info here: http://www.gnu.org/software/libc/manual/html_node/Rounding.html
Note the caveat listed there: "You should avoid changing the rounding mode if possible. It can be an expensive operation; also, some hardware requires you to compile your program differently for it to work. The resulting code may run slower. See your compiler documentation for details."
So, not sure how portable this is, nor if it is really worth the effort.
Keeping the ticket for a bit longer now, but unless someone has a real need, unlikely this'll be implemented.
This is unlikely to be implemented anytime soon; will re-open if there's an external request for the same.