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

add <= and >= operators to Approx (and also maybe < and >) #52

Closed
onqtam opened this issue Feb 25, 2017 · 2 comments
Closed

add <= and >= operators to Approx (and also maybe < and >) #52

onqtam opened this issue Feb 25, 2017 · 2 comments

Comments

@onqtam
Copy link
Member

onqtam commented Feb 25, 2017

No description provided.

@jonathansharman
Copy link

This seems unnecessary to me. The point of Approx is to compensate for the fact that floating-point imprecision leads to equality checks almost always being false. You shouldn't need to introduce an epsilon if you're testing for inequality.

@onqtam
Copy link
Member Author

onqtam commented Feb 25, 2017

well the <= and >= operators got added to Catch so I figured I might as well do the same - it's just a few lines of code.

This is indeed not requested yet for doctest but someone might have a use for it - and it's trivial to implement. I'm wasting time with such minor stuff until I get back on the horse with big and important features.

Thanks for the interest!

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

2 participants