Re: [sage-devel] ComplexField dilog precision bug

2017-02-13 Thread Nathan Dunfield
FYI, I found a very similar issue with "exp" and "log" for purely imaginary numbers: http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1896 Nathan -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop

Re: [sage-devel] ComplexField dilog precision bug

2017-02-13 Thread Jeroen Demeyer
On 2017-02-13 10:19, John Cremona wrote: Thanks Jeroen for the very fast diagnosis and fix. The fix comes from PARI (Karim Belabas to be precise), not me. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop

Re: [sage-devel] ComplexField dilog precision bug

2017-02-13 Thread John Cremona
Thanks Jeroen for the very fast diagnosis and fix. On 13 February 2017 at 08:23, Jeroen Demeyer wrote: > On 2017-02-13 09:18, Jeroen Demeyer wrote: >> >> Reported upstream: >> https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1895 > > > And already fixed (within

Re: [sage-devel] ComplexField dilog precision bug

2017-02-13 Thread Jeroen Demeyer
On 2017-02-13 09:18, Jeroen Demeyer wrote: Reported upstream: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1895 And already fixed (within 30 minutes of reporting it!) I will add the patch to https://trac.sagemath.org/ticket/22276 -- You received this message because you are

Re: [sage-devel] ComplexField dilog precision bug

2017-02-13 Thread Jeroen Demeyer
Reported upstream: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1895 -- 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

Re: [sage-devel] ComplexField dilog precision bug

2017-02-12 Thread Jeroen Demeyer
On 2017-02-12 21:14, Nils Bruin wrote: sage: U=ComplexField(300)(1/2+sqrt(-3)/2) sage: U._pari_() 0.500 + 0.866025403784439*I so the thing the dilog is taken of doesn't even have the right precision Actually, it does have the right precision, it's just that PARI only prints a few

Re: [sage-devel] ComplexField dilog precision bug

2017-02-12 Thread Nils Bruin
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 >

Re: [sage-devel] ComplexField dilog precision bug

2017-02-12 Thread John Cremona
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. Jeroen do you know the answer? On 12 Feb 2017 20:14, "Nils Bruin"

Re: [sage-devel] ComplexField dilog precision bug

2017-02-12 Thread Nils Bruin
On Sunday, February 12, 2017 at 10:59:06 AM UTC-8, Matthias Goerner wrote: > > Careful: you are changing the default precision before calling dilog. That > might mask the problem with pari's dilog. Indeed, the dilog is just implemented as self._parent(self._pari_().dilog()) and: sage:

Re: [sage-devel] ComplexField dilog precision bug

2017-02-12 Thread Matthias Goerner
Careful: you are changing the default precision before calling dilog. That might mask the problem with pari's 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

Re: [sage-devel] ComplexField dilog precision bug

2017-02-12 Thread John Cremona
The dilog function is calling pari which does not seem to have this fault: ? \pb 600 realbitprecision = 600 significant bits (180 decimal digits displayed) ? z = (1+sqrt(-3))/2 %1 = 1/2 +