I just uploaded an program that I wrote a long time ago that does computations with "infinite" precision in the sense that it keeps track of the accuracy of the results. All I did in the meantime is adapt it to more modern Python versions, but it might be "old-fashioned"; I remember that the Python I wrote it on forbid me to write "1L<<1000" and gave an "outrageous left shift" error. Also, I was a lot younger than; the code is a tad dirty here and there.
I don't think it is very useful for sympy, but maybe they can steal some of the algorithms; the actual code is too incompatible, I think. But it was soo much fun to write, and I hope fun to study as well. Anyway, here a small idea on how it works; have a look inside if you're really interested. >>> import real >>> real.sin(4) #functions available are most "standard" functions, plus >>> factorial -.75680249530792825137263909451183+-5 >>> real.default=100 #setting the precision >>> real.sin(10**100) #not enough precision for this value 0.+-1 >>> real.default=300 >>> real.sin(10**100) #this is enough -. 37237612366127668826208669555316429571966788356743470236441538829671922404375644118873660041620302321867558548499796658023861252813730579852162566088617268652048851744358672454980799378100554605424110+-2 >>> real.pa(real.pi) #pa stands for "print all digits": it does, until you run >>> out of patience or memory 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550[goes on forever until you hit ^C] >>> real.fact(10) #there's a factorial function 3628800.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000+-1 >>> real.fact(.5) #...extended as the gamma function! .8862269255+-1 >>> real.fact(real.r(1,2,100)) #this is how you write "1/2 to 100 digits" . 88622692545275801364908374167057259139877472806119356410690389492645564229551609068747532836926+-3 >>> real.sqrt(real.pi())/2 #yep, that's correct . 886226925452758013649083741670572591398774728061193564106903894926455642295516090687475328369272332706+-4 --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---