From: yangguo@chromium.org Date: Mon, 3 Nov 2014 09:40:12 +0000 (+0000) Subject: Fix constant in Math.tan implementation. X-Git-Tag: upstream/4.7.83~5954 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e634bdb290cb3761b9335d1bf7ec016fb3ebdbd5;p=platform%2Fupstream%2Fv8.git Fix constant in Math.tan implementation. R=jkummerow@chromium.org, rtoy@chromium.org BUG=chromium:427468 LOG=Y Review URL: https://codereview.chromium.org/695263002 Cr-Commit-Position: refs/heads/master@{#25060} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/third_party/fdlibm/fdlibm.js b/src/third_party/fdlibm/fdlibm.js index 08c6f5e..b52f1de 100644 --- a/src/third_party/fdlibm/fdlibm.js +++ b/src/third_party/fdlibm/fdlibm.js @@ -267,7 +267,7 @@ function KernelTan(x, y, returnTan) { } } } - if (ix >= 0x3fe59429) { // |x| > .6744 + if (ix >= 0x3fe59428) { // |x| > .6744 if (x < 0) { x = -x; y = -y; diff --git a/test/mjsunit/sin-cos.js b/test/mjsunit/sin-cos.js index 71fae20..fb6f858 100644 --- a/test/mjsunit/sin-cos.js +++ b/test/mjsunit/sin-cos.js @@ -227,6 +227,8 @@ assertEquals(-two_32, Math.tan(-two_32)); assertEquals(0.8211418015898941, Math.tan(11/16)); assertEquals(-0.8211418015898941, Math.tan(-11/16)); assertEquals(0.41421356237309503, Math.tan(Math.PI / 8)); +// crbug/427468 +assertEquals(0.7993357819992383, Math.tan(0.6743358)); // Tests for Math.sin. assertEquals(0.479425538604203, Math.sin(0.5));