Updates:
Status: WorkingAsIntended
Comment #3 on issue 3006 by [email protected]: Inaccurate sin/cos values
http://code.google.com/p/v8/issues/detail?id=3006
This is working as intended. Here is why:
Double precision floating point has approximately 16 significant decimal
digits. So 1000000 as a double can actually is anything from
999999.99999999995 to 1000000.00000000005
Math.cos(999999.99999999995) is the same as Math.cos(5.92562114004) =
0.936752127514
Math.cos(1000000.00000000005) is the same as Math.cos(5.925621140144) =
0.9367521275507
The old (0.9367521275331452) and new (0.9367521275407805) approximation are
both still well within that range.
The fact is that if you use large double values for sine and cosine, you
lose precision that matters, because both are periodic.
The ulp for 2^120 is somewhere around 2^68, a resolution way beyond the
periodicity of 0..2*pi. Nobody should expect sane results here.
--
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/groups/opt_out.