-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Why aren't Math.ceil
and Math.floor
specified in terms of the spec's mathematical operations
#1422
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cc @allenwb; I'm assuming because it's tricky to talk about the boundaries between mathematical operations and the edge cases of JS number values (zeroes, infinities, NaN). |
I think the
|
I'm not touching things like |
These seem like reasonable editorial PRs to me. |
The mathematical floor function and |
The Math operations are specified using algorithms as of #2122, as suggested above. As such I'm closing this, but feel free to reopen if you think there's still something to be done here. |
In the mathematical operations part of the spec, there's a reference to a
floor
function, specified in terms of subtraction andmodulo
in its note. There is no correspondingceil
function, but it could be similarly specified asceil(x) = -floor(-x)
.Is there a reason these aren't used for
Math.ceil
andMath.floor
? Similarly, is there a reason whymax
andmin
aren't used forMath.max
orMath.min
, respectively?The text was updated successfully, but these errors were encountered: