On Sunday, February 12, 2017 at 2:11:29 PM UTC-8, John Cremona wrote:
>
> About 8 years ago I spent a long time making sure that precision was 
> handled correctly in converting between Sage and pari.  Since then the 
> interface has totally changed and possibly these recent changes are at 
> fault.
>
> OK, perhaps it works better than the printing makes us believe:

sage: RealField(200)(2)._pari_().sqrt()._sage_() ^2
2.000000000000000000000000000000000000000000000000000000000000000000000000000
sage: RealField(20)(2)._pari_().sqrt()._sage_() ^2
2.00000000000000000

and indeed, in Pari it seems the default precision doesn't come into play 
with taking square roots:

? \p 200
   realprecision = 211 significant digits (200 digits displayed)
? a=2.0
%8 = 
2.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? \p 20
   realprecision = 38 significant digits (20 digits displayed)
? sqrt(a)^2-a
%9 = -4.752728915737899559 E-212

so I guess the default precision only comes up with more complicated 
functions such a dilog.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to