private static unsafe bool IsNegativeZero(double value) { // Simple equals function will report that -0 is equal to +0, so compare bits instead double negativeZero = -0e0; return (*(Int64*)&value == *(Int64*)&negativeZero); }