On Wed, Mar 28, 2012 at 2:45 AM, Joachim Durchholz <[email protected]> wrote:
> Am 27.03.2012 21:14, schrieb someone: > >> But then there is the question if it is possible and fruitful >> to just replace floats by mpfloats/bigfloatsor if this gives >> bad behaviour. >> > > One bad behaviour would be getting fractions with extremely large > numerators and denominators. > Floats are essentially trading precision for a smaller memory footprint. > > The limit_denominator can help with this: >>> Rational(2**40,3**39) 1099511627776/4052555153018976267 >>> _.limit_denominator(10**15) 244736711/902045048220285 >>> _.limit_denominator(10**12) 77999/287486954567 -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
