Re: [sage-devel] bug in cos ?!

2017-09-17 Thread Bruno Le Floch
Thank you Thierry, I had stupidly only looked at the doctests for cos in Sage 7.2. Bruno On 09/16/2017 06:16 PM, Thierry wrote: > Hi, > > this might be related to: > > https://trac.sagemath.org/ticket/20752 > https://trac.sagemath.org/ticket/20742 > > (and it is doctested). > > Ciao, >

Re: [sage-devel] bug in cos ?!

2017-09-16 Thread Thierry
Hi, this might be related to: https://trac.sagemath.org/ticket/20752 https://trac.sagemath.org/ticket/20742 (and it is doctested). Ciao, Thierry On Sat, Sep 16, 2017 at 03:17:27PM -0400, Bruno Le Floch wrote: > Hello, > > In fact, it seems that in Sage 7.2, cos((p/q)*pi) gets reduced mod

Re: [sage-devel] bug in cos ?!

2017-09-16 Thread Bruno Le Floch
Hello, In fact, it seems that in Sage 7.2, cos((p/q)*pi) gets reduced mod pi instead of 2pi, at least in cases where it does not simplify to square roots: sage: [cos(pi*(i+13)/13) - cos(pi*i/13) for i in range(0,50) if i%13!=0] == [0]*46 True It would be good to know what fixed that bug.

Re: [sage-devel] bug in cos ?!

2017-09-16 Thread Mickael Pechaud
Problem solved by upgrading, thanks. Mickaël -- 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 sage-devel+unsubscr...@googlegroups.com. To post to this group, send

Re: [sage-devel] bug in cos ?!

2017-09-16 Thread Mickael Pechaud
Thanks, I'll try that, and come back if I have still this issue with the 8.0. Still, big problem in the 7.2 ?! Or could it be related to other libraries ? Mickaël -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group

Re: [sage-devel] bug in cos ?!

2017-09-16 Thread Mickael Pechaud
Hello, you might have missed the minus sign and the "it should be positive" in my post. Best regards, Mickaël On Saturday, September 16, 2017 at 1:33:47 PM UTC+2, David Joyner wrote: > > On Sat, Sep 16, 2017 at 7:27 AM, Mickael Pechaud > wrote: > > Hello, > >

Re: [sage-devel] bug in cos ?!

2017-09-16 Thread John Cremona
You should upgrade to a more recent version: ┌┐ │ SageMath version 8.0, Release Date: 2017-07-21 │ │ Type "notebook()" for the browser-based notebook interface.│ │ Type "help()" for help.

Re: [sage-devel] bug in cos ?!

2017-09-16 Thread David Joyner
On Sat, Sep 16, 2017 at 7:27 AM, Mickael Pechaud wrote: > Hello, > > I'm running SageMath 7.2, on a 64bits laptop with a Ubuntu 16.04.2 LTS > (xenial). I got a wrong answer from cos : > > sage: float(cos(14*pi/9)) > -0.17364817766693041 > FYI, cocalc.com returns

[sage-devel] bug in cos ?!

2017-09-16 Thread Mickael Pechaud
Hello, I'm running SageMath 7.2, on a 64bits laptop with a Ubuntu 16.04.2 LTS (xenial). I got a wrong answer from cos : sage: float(cos(14*pi/9)) -0.17364817766693041 It should be positive - and it's inconsistent with the following lines : sage: float(cos(14*pi/9-2*pi))