示例#1
0
        public static Rational operator-(Rational rational)
        {
            Rational ret = new Rational(rational);

            ret.NegateInplace();
            return(ret);
        }
示例#2
0
        public static Rational operator-(double n, Rational rational)
        {
            Rational ret = new Rational(rational);

            ret.NegateInplace();
            ret.AddInplace(n);
            return(ret);
        }
示例#3
0
        public static Rational operator-(Polynomial polynomial, Rational rational)
        {
            Rational ret = new Rational(rational);

            ret.NegateInplace();
            ret.AddInplace(polynomial);
            return(ret);
        }
示例#4
0
 /// <summary>
 /// Negate a rational.
 /// </summary>
 public static Rational operator -(Rational rational)
 {
     Rational ret = new Rational(rational);
     ret.NegateInplace();
     return ret;
 }
示例#5
0
 /// <summary>
 /// Subtract a rational from a real number.
 /// </summary>
 public static Rational operator -(
     double n,
     Rational rational)
 {
     Rational ret = new Rational(rational);
     ret.NegateInplace();
     ret.AddInplace(n);
     return ret;
 }
示例#6
0
 /// <summary>
 /// Subtract a rational from a polynomial.
 /// </summary>
 public static Rational operator -(
     Polynomial polynomial,
     Rational rational)
 {
     Rational ret = new Rational(rational);
     ret.NegateInplace();
     ret.AddInplace(polynomial);
     return ret;
 }