Fix constant in Math.tan implementation.
authoryangguo@chromium.org <yangguo@chromium.org>
Mon, 3 Nov 2014 09:40:12 +0000 (09:40 +0000)
committeryangguo@chromium.org <yangguo@chromium.org>
Mon, 3 Nov 2014 09:40:44 +0000 (09:40 +0000)
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

src/third_party/fdlibm/fdlibm.js
test/mjsunit/sin-cos.js

index 08c6f5e..b52f1de 100644 (file)
@@ -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;
index 71fae20..fb6f858 100644 (file)
@@ -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));