Closed
Description
var first = 25000000000.000000000000m;
var second = 25000000000m;
Console.WriteLine(first.Equals(second)); //true
Console.WriteLine(first.GetHashCode() == second.GetHashCode()); //false
first = 25000000001.000000000000m;
second = 25000000001m;
Console.WriteLine(first.Equals(second)); //true
Console.WriteLine(first.GetHashCode() == second.GetHashCode()); //true
first = 25000000000.100000000000m;
second = 25000000000.1m;
Console.WriteLine(first.Equals(second)); //true
Console.WriteLine(first.GetHashCode() == second.GetHashCode()); //true
return false only if precision of one of values is 12 and the precision contains only trailing zeros and significant part is the 25 000 000 000 ^ (2 * n)
Metadata
Metadata
Assignees
Labels
No labels