public bool lessThan(RacketNum other) { if (other.GetType() == typeof(RacketInt)) { return(this.value < ((RacketInt)other).value); } if (other.GetType() == typeof(RacketFloat)) { return(this.value < ((RacketFloat)other).value); } throw new NotImplementedException(); }
public bool greaterThanEqual(RacketNum other) { if (other.GetType() == typeof(RacketInt)) { return(this.value >= ((RacketInt)other).value); } if (other.GetType() == typeof(RacketFloat)) { return(this.value >= ((RacketFloat)other).value); } throw new NotImplementedException(); }
public ObjBox Div(RacketNum other) { if (other.GetType() == typeof(RacketComplex)) { return(new ObjBox(new RacketComplex(value / ((RacketComplex)other).value), typeof(RacketComplex))); } if (other.GetType() == typeof(RacketInt)) { return(new ObjBox(new RacketComplex(value / ((RacketInt)other).value), typeof(RacketComplex))); } if (other.GetType() == typeof(RacketFloat)) { return(new ObjBox(new RacketComplex(value / ((RacketFloat)other).value), typeof(RacketComplex))); } throw new NotImplementedException(); }
public ObjBox Mod(RacketNum other) { if (other.GetType() == typeof(RacketFloat)) { return(new ObjBox(new RacketFloat(value % ((RacketFloat)other).value), typeof(RacketFloat))); } if (other.GetType() == typeof(RacketInt)) { return(new ObjBox(new RacketFloat(value % ((RacketInt)other).value), typeof(RacketFloat))); } if (other.GetType() == typeof(RacketComplex)) { throw new InvalidOperationException("Cannot use mod operation with a complex number"); } throw new NotImplementedException(); }
bool RacketNum.RealQ(RacketNum other) { return true; }
bool RacketNum.FloatQ(RacketNum other) { return false; }
public ObjBox Mod(RacketNum other) { if (other.GetType() == typeof(RacketInt)) { return new ObjBox(new RacketInt(value % ((RacketInt)other).value), typeof(RacketInt)); } if (other.GetType() == typeof(RacketFloat)) { return new ObjBox(new RacketFloat(value % ((RacketFloat)other).value), typeof(RacketFloat)); } if (other.GetType() == typeof(RacketComplex)) { throw new InvalidOperationException("Cannot use mod operation with a complex number"); } throw new NotImplementedException(); }
public bool greaterThan(RacketNum other) { if (other.GetType() == typeof(RacketInt)) return this.value > ((RacketInt)other).value; if (other.GetType() == typeof(RacketFloat)) return this.value > ((RacketFloat)other).value; throw new NotImplementedException(); }
public bool IntegerQ(RacketNum other) { return false; }
public bool ComplexQ(RacketNum other) { return false; }
public ObjBox Mod(RacketNum other) { throw new InvalidOperationException("Cannot use mod operation with a complex number"); }
public bool greaterThan(RacketNum other) { throw new NotImplementedException(); }
bool RacketNum.ComplexQ(RacketNum other) { return(false); }
bool RacketNum.FloatQ(RacketNum other) { return(false); }
public bool FloatQ(RacketNum other) { return(true); }
public bool ComplexQ(RacketNum other) { return(false); }
public bool RealQ(RacketNum other) { return(true); }
bool RacketNum.IntegerQ(RacketNum other) { return(true); }
public bool FloatQ(RacketNum other) { return false; }
public bool lessThanEqual(RacketNum other) { throw new NotImplementedException(); }
public bool RealQ(RacketNum other) { return(false); }
public bool RealQ(RacketNum other) { return false; }
public bool ComplexQ(RacketNum other) { return(true); }
public bool FloatQ(RacketNum other) { return true; }
public bool FloatQ(RacketNum other) { return(false); }
public bool RealQ(RacketNum other) { return true; }
public bool IntegerQ(RacketNum other) { return(false); }
public bool lessThanEqual(RacketNum other) { if (other.GetType() == typeof(RacketInt)) return this.value <= ((RacketInt)other).value; if (other.GetType() == typeof(RacketFloat)) return this.value <= ((RacketFloat)other).value; throw new NotImplementedException(); }
public bool lessThan(RacketNum other) { throw new NotImplementedException(); }
bool RacketNum.ComplexQ(RacketNum other) { return false; }
public bool greaterThanEqual(RacketNum other) { throw new NotImplementedException(); }
bool RacketNum.IntegerQ(RacketNum other) { return true; }
public bool ComplexQ(RacketNum other) { return true; }
public ObjBox Sub(RacketNum other) { if (other.GetType() == typeof(RacketInt)) { return new ObjBox(new RacketInt(value - ((RacketInt)other).value), typeof(RacketInt)); } if (other.GetType() == typeof(RacketFloat)) { return new ObjBox(new RacketFloat(value - ((RacketFloat)other).value), typeof(RacketFloat)); } if (other.GetType() == typeof(RacketComplex)) { return new ObjBox(new RacketComplex(value - ((RacketComplex)other).value), typeof(RacketComplex)); } throw new NotImplementedException(); }
bool RacketNum.RealQ(RacketNum other) { return(true); }