double
is a type that represents 64-bit IEEE 754 floating-point number in Java
double
is a type that represents 64-bit double-precision number in IEEE 754 format in C#.
Both languages follow the same specification. So why there is difference in following code? I checked Mono as well.
Double.MIN_VALUE == (Double.MIN_VALUE + 1.0); // false
Java ideone
Console.WriteLine(Double.MinValue == (Double.MinValue + 1.0)); // true
C# ideone
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…