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

percentage function should throw error if result would be NaN #2553

Closed
calvinjuarez opened this issue Apr 16, 2015 · 0 comments
Closed

percentage function should throw error if result would be NaN #2553

calvinjuarez opened this issue Apr 16, 2015 · 0 comments
Labels

Comments

@calvinjuarez
Copy link
Member

As mentioned by @seven-phases-max on #1880 (comment), a call to percentage that would currently return NaN% should instead throw an error.

This is potentially a breaking change, since it would stop compiling things that currently compile successfully (albeit poorly).

Example:

With strict-math on, the following returns NaN%, but it should error, like round or floor do.

percentage(16/17)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants