Skip to content

deleted #18

Closed
Closed
@khoroshevj

Description

@khoroshevj
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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions