Comment #48 on issue 3006 by [email protected]: Inaccurate sin/cos values
http://code.google.com/p/v8/issues/detail?id=3006
Here's a little program that can show noticeable imprecision, perhaps it
can be useful,
===
#include <stdio.h>
#include <math.h>
int main() {
double x = 0, max = 0, min = 0;
for (int i = 0; i < 100; i++) {
x += sin(1/(0.1 + fabs(sin(x))));
if (x > max) max = x;
if (x < min) min = x;
}
printf("final: %2.5f\n", x);
printf("max: %2.5f\n", max);
printf("min: %2.5f\n", min);
}
===
Attached is an emscripten-compiled version. In a native build and on
spidermonkey, the results are identical on my machine, |final: 55.46809|,
whereas on v8 it is different, |final: 57.05455|.
Attachments:
a.out.js 167 KB
--
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.