public static bool IsNegativeZero(double self) {
#if SILVERLIGHT // BitConverter.DoubleToInt64Bits
if ( self != 0.0 ) {
return false;
}
byte[] bits = BitConverter.GetBytes(self);
return (bits[7] == 0x80 && bits[6] == 0x00 && bits[5] == 0x00 && bits[4] == 0x00
&& bits[3] == 0x00 && bits[2] == 0x00 && bits[1] == 0x00 && bits[0] == 0x00);
#else
return (self == 0.0 && 1.0 / self < 0);
#endif
}