]> git.kaiwu.me - njs.git/commitdiff
Fixed a unit test for Math.acosh().
authorValentin Bartenev <vbart@nginx.com>
Fri, 2 Dec 2016 14:11:57 +0000 (17:11 +0300)
committerValentin Bartenev <vbart@nginx.com>
Fri, 2 Dec 2016 14:11:57 +0000 (17:11 +0300)
njs/test/njs_unit_test.c

index 18888f3d23f48a16b7249f3574500a354f825831..83fad66d24094572fe778ba9dae6b5f33840cdc7 100644 (file)
@@ -5568,11 +5568,11 @@ static njs_unit_test_t  njs_test[] =
       nxt_string("Infinity") },
 
     /*
-     * The difference is 2 * Number.EPSILON on FreeBSD
+     * The difference is Number.EPSILON on Linux/i686
      * and zero on other platforms.
      */
-    { nxt_string("Math.abs(Math.cosh(1) - (1/Math.E + Math.E)/2)"
-                 " <= 2 * Number.EPSILON"),
+    { nxt_string("Math.abs(Math.acosh((1/Math.E + Math.E)/2) - 1)"
+                 " <= Number.EPSILON"),
       nxt_string("true") },
 
     { nxt_string("Math.asin()"),