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

Fix floating point equality tests #597

Closed
wants to merge 1 commit into from
Closed

Fix floating point equality tests #597

wants to merge 1 commit into from

Conversation

krader1961
Copy link
Contributor

You can't compare a computed floating point value to a constant when the
values cannot be expressed exactly in binary floating point representation.
You have to compute the absolute difference and verify it is less than
some epsilon.

Partial fix for #546

You can't compare a computed floating point value to a constant when the
values cannot be expressed exactly in binary floating point representation.
You have to compute the absolute difference and verify it is less than
some epsilon.

Partial fix for #546
@siteshwar
Copy link
Contributor

LGTM

@krader1961 krader1961 closed this Jun 14, 2018
@krader1961 krader1961 deleted the arith-test branch June 24, 2018 20:33
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

Successfully merging this pull request may close these issues.

2 participants