sbv icon indicating copy to clipboard operation
sbv copied to clipboard

Consider generating C-code for FP ops with different rounding modes

Open LeventErkok opened this issue 9 years ago • 1 comments

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.

LeventErkok avatar Apr 21 '15 04:04 LeventErkok

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.

LeventErkok avatar Jul 12 '15 22:07 LeventErkok

This is unlikely to be implemented anytime soon; will re-open if there's an external request for the same.

LeventErkok avatar Nov 22 '23 18:11 LeventErkok