Comment #53 on issue 3006 by [email protected]: Inaccurate sin/cos values
https://code.google.com/p/v8/issues/detail?id=3006

Thanks for all the hard work on coming to an excellent solution to this issue.

For future decision making, I'd like to register a vote for 1 ulp as a target precision where possible, or a small handful of ulps if the tradeoff is considered very carefully. Max error is important here. RMS is not a good measure.

Note that rounding sin(-1e-16) to 0 is not a matter of being off by a few ulps--it's a matter of being off by all of them! All 54 bits of the mantissa, down the toilet, when they could have all been retained by just returning the input.

Application developers can choose to ignore numbers below some *absolute* threshold, like 1e-16 or whatever is appropriate in their circumstances, but as language implementers, it's important to be conservative about *relative* precision, because you don't know when numbers of a certain scale will be used in someone else's application. IEEE arithmetic gives us wonderful tools to achieve this--we just have to respect them and use them correctly.

I came across this issue because some of our unit tests on www.desmos.com have been failing for a while in Chrome. We're proud of offering a very high quality graphing calculator implemented in JS, and we're counting on you as language implementers to give us good foundations to build on. We love the performance improvements, but correctness comes first.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to