示例#1
0
 public static FractionValue Root(BigInteger principal, FractionValue radical)
 {
     if (principal == 0)
     {
         throw new Exception("n.a");
     }
     else if (radical == (FractionValue)0)
     {
         return(0);
     }
     else
     {
         //TODO
         throw new NotImplementedException();
     }
 }
示例#2
0
 //Copy pasta https://stackoverflow.com/questions/20593755/why-do-i-have-to-overload-operators-when-implementing-compareto
 private static int CompareTo(FractionValue x, FractionValue y) => x.CompareTo(y);
示例#3
0
 public static FractionValue Root(FractionValue principal, FractionValue radical) => Root(principal.N, radical ^ principal.Z);