From d315f5025153ac334cf5ca9c20faa42da713c6c2 Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Mon, 11 Dec 2017 18:48:11 -0500 Subject: [PATCH] Increase alllowed tolerance in tan()/sec() tests Part of addressing #320 #232 #197 --- S02-types/num.t | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/S02-types/num.t b/S02-types/num.t index af9e6ad934..e7fc2471a4 100644 --- a/S02-types/num.t +++ b/S02-types/num.t @@ -522,8 +522,10 @@ ok Num === Num, 'Num === Num should be truthy, and not die'; is-approx tan(my num $ = -π), my num $ = 0e0, '-π'; is-approx tan(my num $ = π/4), my num $ = 1e0, 'π/4'; is-approx tan(my num $ = -π/4), my num $ = -1e0, '-π/4'; - is-approx tan(my num $ = π/2), (sin(π/2) / cos(π/2)), 'π/2'; - is-approx tan(my num $ = -π/2), -(sin(π/2) / cos(π/2)), '-π/2'; + is-approx tan(my num $ = π/2), (sin(π/2) / cos(π/2)), 'π/2', + :rel-tol<5e-5>; + is-approx tan(my num $ = -π/2), -(sin(π/2) / cos(π/2)), '-π/2', + :rel-tol<5e-5>; } subtest 'atan(num)' => { @@ -556,8 +558,10 @@ ok Num === Num, 'Num === Num should be truthy, and not die'; is-approx sec(my num $ = -π/4), my num $ = 2/√2, '-π/4'; # Since we don't have perfect π, cheetsy-doodle to get "infinity" - is-approx sec(my num $ = π/2), my num $ = tan(π/2), 'π/2'; - is-approx sec(my num $ = -π/2), my num $ = tan(π/2), '-π/2'; + is-approx sec(my num $ = π/2), my num $ = tan(π/2), 'π/2', + :rel-tol<5e-5>; + is-approx sec(my num $ = -π/2), my num $ = tan(π/2), '-π/2', + :rel-tol<5e-5>; } subtest 'asec(num)' => {