public static float Abs(float value) { const uint mask = 0x7FFFFFFF; uint raw = BitConverter.SingleToUInt32Bits(value); return(BitConverter.UInt32BitsToSingle(raw & mask)); }
static float IBitwiseOperators <float, float, float> .operator ~(float value) { uint bits = ~BitConverter.SingleToUInt32Bits(value); return(BitConverter.UInt32BitsToSingle(bits)); }
static float IBitwiseOperators <float, float, float> .operator ^(float left, float right) { uint bits = BitConverter.SingleToUInt32Bits(left) ^ BitConverter.SingleToUInt32Bits(right); return(BitConverter.UInt32BitsToSingle(bits)); }