Welcome! Log In Create A New Profile

Advanced

[njs] Fixed a unit test for Math.acosh().

Valentin Bartenev
December 02, 2016 09:14AM
details: http://hg.nginx.org/njs/rev/7275165c3832
branches:
changeset: 271:7275165c3832
user: Valentin Bartenev <vbart@nginx.com>
date: Fri Dec 02 17:11:57 2016 +0300
description:
Fixed a unit test for Math.acosh().

diffstat:

njs/test/njs_unit_test.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diffs (18 lines):

diff -r f8f20b27724e -r 7275165c3832 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c Thu Dec 01 19:45:19 2016 +0300
+++ b/njs/test/njs_unit_test.c Fri Dec 02 17:11:57 2016 +0300
@@ -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()"),

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed a unit test for Math.acosh().

Valentin Bartenev 455 December 02, 2016 09:14AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 274
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready