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

Strange intrinsic name "round_to_even" #40

Open
eschnett opened this issue Nov 1, 2019 · 2 comments
Open

Strange intrinsic name "round_to_even" #40

eschnett opened this issue Nov 1, 2019 · 2 comments
Labels
question Further information is requested

Comments

@eschnett
Copy link
Contributor

eschnett commented Nov 1, 2019

The intrinsic name round_to_even sounds strange. I assume that this is the usual "round to the nearest integer, break ties towards even numbers". However, the name of the intrinsic reads as if it always rounded towards the nearest even number, i.e. as if it never returned an odd number.

@gquintin
Copy link
Contributor

gquintin commented Nov 1, 2019

We followed the naming from the R programming language. Cf. https://cran.r-project.org/doc/manuals/r-release/fullrefman.pdf, page 459. Maybe this was a bad idea. What name do you suggest?

@gquintin gquintin added the question Further information is requested label Nov 1, 2019
@eschnett
Copy link
Contributor Author

eschnett commented Nov 1, 2019

Page 459 of this document refers to the round function; I don't see a round_to_even in the document.

I would have called it round_to_nearest or round_ieee.

I also found this, which lists names used in other languages. It seems that they mostly call it either just round or round_even.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants