8000 Use "approx" to deal with floating point comparisons · ChaiScript/ChaiScript_Extras@1ef3d38 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ef3d38

Browse files
committed
Use "approx" to deal with floating point comparisons
1 parent 670d0e0 commit 1ef3d38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/math.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ TEST_CASE( "Math functions work", "[math]" ) {
3232

3333
CHECK(chai.eval<double>("acosh(1.0)") == acosh(1.0));
3434
CHECK(chai.eval<double>("asinh(0.5)") == asinh(0.5));
35-
CHECK(chai.eval<double>("atanh(0.5)") == atanh(0.5));
35+
CHECK(chai.eval<double>("atanh(0.5)") == Approx(atanh(0.5)));
3636

3737
// EXPONENTIAL AND LOGARITHMIC FUNCTIONS
3838
CHECK(chai.eval<double>("exp(0.5)") == exp(0.5));

0 commit comments

Comments
 (0)
0