Comment #5 on issue 3006 by [email protected]: Inaccurate sin/cos values
http://code.google.com/p/v8/issues/detail?id=3006
Btw. the reason the audio tests fail is because it samples a sine wave.
Something like
for (var i = 0; i < 1000000; i++) {
samples[i] = Math.sin(i*2*pi/10000);
}
At some of the sample points the value is a multiple of 2*pi, but due to
loss of precision, it appears only close to a multiple of 2*pi. In some
cases, the old version returns something like -7.1e-15, while the new
version returns precisely 0, in some other cases, it's the other way round.
Since the double value is turned to a 16-bit value, it truncates so that
something like -7.1e-15 ends up becoming -1 while 0 stays 0.
The actual sound file has some bit patterns changed, but since digital
sampling inherently contains rounding errors, this is not a concern and I
can assure you that nobody can actually hear the difference.
--
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.