BTW, if I change the iteration limit to 250 or more, I get a <type 'exceptions.RuntimeError'>: maximum recursion depth exceeded when evaluating float(a)... (sage 3.0)
Gonzalo On 6/2/08, Gonzalo Tornaria <[EMAIL PROTECTED]> wrote: > On 6/2/08, William Stein <[EMAIL PROTECTED]> wrote: > > Doing that sum works fine now. It's even fun. That > > all the following work fine even with our current system > > says something... > > > > sage: a = sum([sqrt(p) for p in primes(1000)]) > > sage: float(a) > > 3307.7690992952139 > > sage: RDF(a) > > 3307.7690993 > > sage: RealField(1000)(a) > > > 3307.76909929521532337080828563375122663883932558794796752652934831207623440969500409157102585876606649295101934045235119416217303162488345812238151772485033866010535293142064829106852999118135254502207045010375309268967623016528462090375140033057342943102054036545832373683901618507572426685968323860 > > > > sage: a = e - 1 > sage: for i in range(2,100): > ....: a = (a-1)*i > ....: > sage: float(a) > -1.3491675327339235e+140 > sage: RDF(a) > -1.34916753273e+140 > sage: RealField(1000)(a) > > 1.01009999010191094737330783479071750558784854694330666719781458645331617143268163560343706814329184685328514081778158205141322918688406340340355792675106115099850396387113493402064121653102597587035584599866091432567502680436745983344808432577075043013574712846877319486115708287043275014203343194844 > > sage: a = e - 1 > sage: for i in range(2,200): > ....: a = (a-1)*i > ....: > sage: float(a) > -inf > sage: RealField(100)(a) > -5.6297658631950881996939935452e342 > sage: RealField(200)(a) > 1.1804891378835970579289419600656355595291746689227892615143e312 > sage: RealField(10000)(a) > 1.00502499.... > > -- > > Gonzalo > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---