Example #1
0
 public static bool IsSquare(Rational r)
 {
     r = r.Reduce();
     return(IsSquare(r.Numerator) && IsSquare(r.Denomerator));
 }
Example #2
0
 public static Rational Sqrt(Rational r)
 {
     r = r.Reduce();
     return(new Rational(Sqrt(r.Numerator), Sqrt(r.Denomerator)));
 }