public static double Abs(double value) { const ulong mask = 0x7FFFFFFFFFFFFFFF; ulong raw = BitConverter.DoubleToUInt64Bits(value); return(BitConverter.UInt64BitsToDouble(raw & mask)); }
static double IBitwiseOperators <double, double, double> .operator ~(double value) { ulong bits = ~BitConverter.DoubleToUInt64Bits(value); return(BitConverter.UInt64BitsToDouble(bits)); }
static double IBitwiseOperators <double, double, double> .operator ^(double left, double right) { ulong bits = BitConverter.DoubleToUInt64Bits(left) ^ BitConverter.DoubleToUInt64Bits(right); return(BitConverter.UInt64BitsToDouble(bits)); }