G
Guest
Hi,
Does the Double has the facilty to define -0.
If it has, "==" or System.Math.Sign() doesn't able to differentiate between -0 & 0.
i.e.
Double x = -0.0d
Double y = 0.0d
if(value == -0.0d) {//both x & y drops in this statement.
//is minus zero
}
else {
//Not minus zero
}
How to differentiate -0.0d & 0.0d in if statement?
Thank you,
Avin Patel
Does the Double has the facilty to define -0.
If it has, "==" or System.Math.Sign() doesn't able to differentiate between -0 & 0.
i.e.
Double x = -0.0d
Double y = 0.0d
if(value == -0.0d) {//both x & y drops in this statement.
//is minus zero
}
else {
//Not minus zero
}
How to differentiate -0.0d & 0.0d in if statement?
Thank you,
Avin Patel