Skip to content

Commit

Permalink
fix: increased tolerance for single point precision numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
aayush0325 committed Oct 17, 2024
1 parent e0e3e18 commit 0a92b55
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ tape( 'the function computes the arccosine in degrees (negative values)', opts,
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
} else {
delta = absf( y - expected[i] );
tol = 1.4 * EPS * absf( expected[i] );
tol = 2.8 * EPS * absf( expected[i] );
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' );
}
}
Expand All @@ -98,7 +98,7 @@ tape( 'the function computes the arccosine in degrees (positive values)', opts,
t.equal( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] );
} else {
delta = absf( y - expected[i] );
tol = 1.4 * EPS * absf( expected[i] );
tol = 2.8 * EPS * absf( expected[i] );
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' );
}
}
Expand Down

0 comments on commit 0a92b55

Please sign in to comment.