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

Deduce Approx epsilon for float #36

Closed
philsquared opened this issue Jun 2, 2011 · 2 comments
Closed

Deduce Approx epsilon for float #36

philsquared opened this issue Jun 2, 2011 · 2 comments

Comments

@philsquared
Copy link
Collaborator

Approx() takes its arguments as doubles - which is fine, except when one of them is a float and it picks up the epsilon value of a double.

Taking the arguments generically, and using epsilon for float when the argument is a float, should address the issue - even if the values are then stored as doubles.

@philsquared
Copy link
Collaborator Author

epsilon/ tolerance should probably be std::numeric_limits::epsilon() * 100

@philsquared
Copy link
Collaborator Author

Left Approx non-generic, but use epsilon for float (*100)

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