Open NolanDeveloper opened 3 years ago
Example:
munit_assert_double_equal(1e100, 1.0000000001e100, 1); // fails
For the same reasons that the next test passes the test above should pass too.
munit_assert_double_equal(1, 1.0000000001, 1);
The better ways of comparing floating point numbers are described here: https://stackoverflow.com/a/253874/4626533
Example:
For the same reasons that the next test passes the test above should pass too.
The better ways of comparing floating point numbers are described here: https://stackoverflow.com/a/253874/4626533