Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
LeventErkok opened this issue Apr 21, 2015 · 2 comments
Closed
Assignees

Comments

@LeventErkok
Copy link
Owner

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 LeventErkok self-assigned this Apr 29, 2015
@LeventErkok
Copy link
Owner Author

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
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant