-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 epsilon great again #28054
Comments
I do not believe that this is worth fixing. A short summation is:
Lets start by defining
To touch on the first point:
To touch on the second point, lets look at "0.1 + 0.2 == 0.3", which is 5 floating-point operations (and 4 times the result is rounded):
Defining a new constant that matches the |
@tannergooding Thanks for the detailed answer. As I can see both With regard to the usage of epsilon. |
Double.Epsilon
andSingle.Epsilon
both have invalid values since .NET 1.0.Details here: https://social.msdn.microsoft.com/Forums/azure/en-US/23c75283-c3c3-41bf-93d9-6b274593c4ed/singleepsilon-isnt
Both properties have a much lower value than they should have. So, let's make these epsilons great again.
I suppose add new constants with valid values:
The text was updated successfully, but these errors were encountered: