Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

munit_assert_double_equal doesn't care about scale of the values #75

Open
NolanDeveloper opened this issue May 28, 2021 · 0 comments
Open

Comments

@NolanDeveloper
Copy link

NolanDeveloper commented May 28, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant