From: yangguo@chromium.org Date: Thu, 14 Nov 2013 10:11:06 +0000 (+0000) Subject: Magic fix for Math.sin/cos. X-Git-Tag: upstream/4.7.83~11758 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1fd56dd7c369ec50d985f95714ff062780960df;p=platform%2Fupstream%2Fv8.git Magic fix for Math.sin/cos. It turns out that Sunspider 1.0's 3d-morph verifies that the floating point error must start with 6. R=jkummerow@chromium.org BUG= Review URL: https://codereview.chromium.org/61593008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/math.js b/src/math.js index 529033e..e1798fa 100644 --- a/src/math.js +++ b/src/math.js @@ -217,7 +217,9 @@ var InitTrigonometricFunctions; // Also define the initialization function that populates the lookup table // and then wires up the function definitions. function SetupTrigonometricFunctions() { - var samples = 1800; // Table size. + // TODO(yangguo): The following table size has been chosen to satisfy + // Sunspider's brittle result verification. Reconsider relevance. + var samples = 4489; var pi = 3.1415926535897932; var pi_half = pi / 2; var inverse_pi_half = 2 / pi;