-
Notifications
You must be signed in to change notification settings - Fork 383
relative error is too big for Math.expm1 and Math.log1p #314
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
Comments
The spec doesn't tend to define precision very well for its Math operations. Can you link to something in the spec that's incorrect here? What values do you expect? In what browser(s) are you getting which values that you don't expect? |
@ljharb , so why not to use |
I'm still not understanding what this issue is about. All three of the variables referenced in the compat-table issue return Also, if the spec does not explicitly say that your error criteria must be applied, then they need not be applied by this shim or by any browsers. I'm definitely open to making them more precise, but the shims are "good" so long as they provide any guarantees the spec requires of them, nothing more. |
Thanks for your examples - I'm sorry we continue to have misunderstandings in these issues, I hope we can chalk it up to language barriers. I've added failing tests for I can't locate a polyfill for |
I have only this(using Taylor series expansion):
|
@Yaffle Thanks, that seems to do it! Can you suggest more meaningful variable names than "t", "s", and "n"? |
Math.expm1(-2e-17)
Math.log1p(-2e-17)
The text was updated successfully, but these errors were encountered: