On Sat, Jul 18, 2009 at 3:31 PM, Vinzent Steinberg<[email protected]> wrote: > > On Jul 8, 10:38 pm, Fredrik Johansson <[email protected]> > wrote: >> On Wed, Jul 8, 2009 at 10:07 PM, Ondrej Certik<[email protected]> wrote: >> > so I am confused about those digits at the end. But apparently they >> > can't be trusted. >> >> This is arguably not a bug. It's hard to determine whether a given >> decimal expansion that goes "999..." or "000..." should be rounded up >> or down. The only way to do it is to continue calculating until a >> digit other than 9 or 0 appears, and in general it's impossible to >> tell whether trying will get you stuck in an infinite loop. >> >> You could write function (or add an evalf option) that tries to find n >> digits, and make it look for trailing 9's or 0's, but you'd have to >> implement some stopping criterion. > > I think we should just add an option that specifies the maximal number > of trailing 9's or 0's to look for, and set a reasonable default for > it.
I think there is no reasonable default, as this example shows. I would just leave it as is, I didn't realize there is no easy fix. Ondrej --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
