Skip to content

[css-values] Sync the trig/pow functions with JS more #4158

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

Closed
tabatkins opened this issue Jul 29, 2019 · 2 comments
Closed

[css-values] Sync the trig/pow functions with JS more #4158

tabatkins opened this issue Jul 29, 2019 · 2 comments
Labels
Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-values-4 Current Work

Comments

@tabatkins
Copy link
Member

The new trig/pow functions were written based on my own observations of the JS functions. The JS test suite is woefully inadequate, testing virtually no behavior details, so I didn't think I could do any better.

It turns out that the JS spec actually does specify these functions in precise detail, so I should go ahead and match it exactly. https://tc39.es/ecma262/#sec-math.pow

@Loirooriol
Copy link
Contributor

@tabatkins You didn't address #4157: the spec says sqrt(X) and pow(X, .5) are equivalent, but for X = −∞ the former is NaN and the latter is +∞

@tabatkins
Copy link
Member Author

Ah, fine. Fixed in 487c2e1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-values-4 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants