public override bool Equals(Value other) { if (other is IntegralValue) { IntegralValue that = ( IntegralValue )other; return(this.LongValue() == that.LongValue()); } else if (other is FloatingPointValue) { FloatingPointValue that = ( FloatingPointValue )other; return(NumberValues.NumbersEqual(that.DoubleValue(), this.LongValue())); } else { return(false); } }
public override int CompareTo(FloatingPointValue other) { return(NumberValues.CompareLongAgainstDouble(LongValue(), other.DoubleValue())); }
public override int CompareTo(FloatingPointValue other) { return(DoubleValue().CompareTo(other.DoubleValue())); }