public static bool Equals(double d1, double d2) { if (Bits.IsNaN(d1) || Bits.IsNaN(d2)) { return(false); } var d1Bits = Bits.Of(d1).ToIntBits(); var d2Bits = Bits.Of(d2).ToIntBits(); return(d1Bits.Equals(d2Bits)); }
public static bool Equals(float v1, float v2) { if (Bits.IsNaN(v1) || Bits.IsNaN(v2)) { return(false); } var v1Bits = Bits.Of(v1).ToIntBits(); var v2Bits = Bits.Of(v2).ToIntBits(); return(v1Bits.Equals(v2Bits)); }
public static bool IsNegative(this double value) { return((Bits.Of(value).ToIntBits().Last() & Numbers.NegativeSignMask) == Numbers.NegativeSignMask); }
public static string GetBinaryString(int value) { return(Bits.Of(value).ToBinaryString()); }