nsimd
nsimd copied to clipboard
Strange intrinsic name "round_to_even"
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.
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?
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
.