示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
 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();
 }
示例#4
0
 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();
 }
示例#5
0
 bool RacketNum.RealQ(RacketNum other)
 {
     return true;
 }
示例#6
0
 bool RacketNum.FloatQ(RacketNum other)
 {
     return false;
 }
示例#7
0
 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();
 }
示例#8
0
        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();
        }
示例#9
0
 public bool IntegerQ(RacketNum other)
 {
     return false;
 }
示例#10
0
 public bool ComplexQ(RacketNum other)
 {
     return false;
 }
示例#11
0
 public ObjBox Mod(RacketNum other)
 {
     throw new InvalidOperationException("Cannot use mod operation with a complex number");
 }
示例#12
0
 public bool greaterThan(RacketNum other)
 {
     throw new NotImplementedException();
 }
示例#13
0
 bool RacketNum.ComplexQ(RacketNum other)
 {
     return(false);
 }
示例#14
0
 bool RacketNum.FloatQ(RacketNum other)
 {
     return(false);
 }
示例#15
0
 public bool FloatQ(RacketNum other)
 {
     return(true);
 }
示例#16
0
 public bool ComplexQ(RacketNum other)
 {
     return(false);
 }
示例#17
0
 public bool RealQ(RacketNum other)
 {
     return(true);
 }
示例#18
0
 bool RacketNum.IntegerQ(RacketNum other)
 {
     return(true);
 }
示例#19
0
 public bool FloatQ(RacketNum other)
 {
     return false;
 }
示例#20
0
 public ObjBox Mod(RacketNum other)
 {
     throw new InvalidOperationException("Cannot use mod operation with a complex number");
 }
示例#21
0
 public bool lessThanEqual(RacketNum other)
 {
     throw new NotImplementedException();
 }
示例#22
0
 public bool RealQ(RacketNum other)
 {
     return(false);
 }
示例#23
0
 public bool RealQ(RacketNum other)
 {
     return false;
 }
示例#24
0
 public bool ComplexQ(RacketNum other)
 {
     return(true);
 }
示例#25
0
 public bool FloatQ(RacketNum other)
 {
     return true;
 }
示例#26
0
 public bool FloatQ(RacketNum other)
 {
     return(false);
 }
示例#27
0
 public bool RealQ(RacketNum other)
 {
     return true;
 }
示例#28
0
 public bool IntegerQ(RacketNum other)
 {
     return(false);
 }
示例#29
0
        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();
        }
示例#30
0
 public bool lessThan(RacketNum other)
 {
     throw new NotImplementedException();
 }
示例#31
0
 bool RacketNum.ComplexQ(RacketNum other)
 {
     return false;
 }
示例#32
0
 public bool greaterThanEqual(RacketNum other)
 {
     throw new NotImplementedException();
 }
示例#33
0
 bool RacketNum.IntegerQ(RacketNum other)
 {
     return true;
 }
示例#34
0
 public bool ComplexQ(RacketNum other)
 {
     return true;
 }
示例#35
0
 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();
 }
示例#36
0
 bool RacketNum.RealQ(RacketNum other)
 {
     return(true);
 }