Paul Zimmermann wrote: > Hi, > > as a followup on the "Arbitrary precision in cython" thread, I'd like to > mention that one can directly use mpfr's implementation from within Sage: > > sage: RealField(150)(10).eint() > 2492.2289762418777591384401439985248489896471 > > It only works for real numbers, but has the advantage to guarantee correct > rounding (for the 150-bit binary result; if you are using the decimal > result above, you have to take into account the binary->decimal conversion > error, which is at most 1/2 ulp).
Just a note: sage: pari(RealField(500)(10)).eint1().python() 4.15696892968532427740285981027818038434629008241953313262759569712786222819608803586147163177527802101305497591041862309918139192016097135380721447598904e-6 sage: RealField(500)(10).eint() 2492.22897624187775913844014399852484898964710143094234538818526713774122742888744417794599665663156560488342454657568480015672868779475213684965774390 sage: sage: pari(RealField(500)(-10)).eint1().python() -2492.22897624187775913844014399852484898964710143094234538818526713774122742888744417794599665663156560488342454657568480015672868779475213684965774390402 sage: RealField(500)(-10).eint() NaN Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---