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
Make the tolerance in step-1 relative. #10923
Conversation
/rebuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Just some minor comments.
examples/step-1/step-1.cc
Outdated
// [round-off](https://en.wikipedia.org/wiki/Round-off_error). As | ||
// a consequence, we can never expect to compare the distance | ||
// with the inner radius by equality: A statement such as | ||
// `if (distance_from_center == inner_radius)` will always fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// `if (distance_from_center == inner_radius)` will always fail | |
// `if (distance_from_center == inner_radius)` will fail |
examples/step-1/step-1.cc
Outdated
// unless we get exceptionally lucky. Rather, we need to do this | ||
// comparison with a certain tolerance, and the usual way to do | ||
// this is to write it as `if (std::abs(distance_from_center - | ||
// inner_radius) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove newline?
@tjhei -- so done! |
No description provided.