On Sun, Feb 22, 2009 at 12:30 PM, Freddie Witherden <fred...@witherden.org>wrote:
> Hi all, > > I am interested if there are currently any plans to add some form of > precision tracking for variables, be it through sympy or mpmath. The current > implementation will more than happily compute sin(0.50) to 100+ decimal > places if asked, even though the argument is only accurate to two decimal > places. hi Freddie. Currently you can set the precission (not globaly) with evalf(precission). For example: >>> sin(1).evalf(100) 0.8414709848078965066525023216302989996225630607983710656727517099919104043912 396689486397435430526959 Hope it helps > > > In Mathematica this feature is implemented as follows: > In: N[Sin[SetPrecision[0.50, 2]], 100] > Out: 0.48 > > Notice how even though the sine of 0.5 was requested to 100 places of > accuracy it was only given to two as that is the maximum allowed by the > input. Naturally combing of numbers of various precisions is also handled > automatically. > > Something like this would be very useful for Sympy and would make > scientific calculations a lot easier. > > Regards, Freddie. > -- Fabian, http://fseoane.net/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---