Hi folks,

John Cremona and I have been working for the past two weeks on fixing the
way real precision gets passed from Sage to the Pari library and back.
Things were extremely broken, due mostly to a misunderstanding of how the
Pari library (as opposed to GP sessions) deals with precision for inexact
numbers.  Precision arguments were either ignored or passed with
ridiculously huge values.  Although the most important conversion-to-pari
functions in the Sage library did things properly, many others were either
plain wrong or inconsistent.

We have been working on this at trac #4096, where there is now a source
patch and a doc patch for your (re)viewing pleasure.  The patch is large,
but the bulk of it consists of fixing precision in doctests.  The new
(correct) precision behavior is documented toward the top of the file
libs/pari/gen.pyx.  In a nutshell, the default real precision in
interactions with the Pari library is now 53 bits, the same as the default
real precision in Sage.  This is also the precision with which Pari library
objects get printed (i.e. 15 significant decimals).  The patch implements
this across the Sage code, resulting in a consistent and better documented
behavior.  Happy side-effects include the removal of some bugs related to
special functions, more clear and consistent code, and uniform behavior
(where possible) on both 32-bit and 64-bit machines.

We would greatly appreciate it if someone could review this.  I am happy to
answer any questions/concerns you might have about the changes.

Best,
Alex

--~--~---------~--~----~------------~-------~--~----~
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/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to