Skip to content

Commit

Permalink
Increase alllowed tolerance in tan()/sec() tests
Browse files Browse the repository at this point in the history
Part of addressing #320 #232 #197
  • Loading branch information
zoffixznet committed Dec 11, 2017
1 parent 65336f6 commit d315f50
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions S02-types/num.t
Expand Up @@ -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)' => {
Expand Down Expand Up @@ -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)' => {
Expand Down

0 comments on commit d315f50

Please sign in to comment.