Exemple #1
0
 def numer(self, a):
     """Returns numerator of `a`. """
     return gmpy_numer(a)
 def to_sympy(self, a):
     """Convert `a` to a SymPy object. """
     return SymPyRational(int(gmpy_numer(a)),
                          int(gmpy_denom(a)))
Exemple #3
0
 def to_sympy(self, a):
     """Convert `a` to a SymPy object. """
     return SymPyRationalType(int(gmpy_numer(a)),
                              int(gmpy_denom(a)))
Exemple #4
0
 def numer(self, a):
     """Returns numerator of `a`. """
     return gmpy_numer(a)