[sage-support] Re: atan2 throws "divide by zero"

2010-03-30 Thread G B
For anyone interested, it looks as though the GiNaC project has released a fix: http://www.cebix.net/pipermail/ginac-devel/2010-March/001732.html I've posted this to the dev list as well. Cheers-- Greg On Mar 23, 7:00 pm, G B wrote: > I won't clutter the discussion with the full traceback un

[sage-support] Re: atan2 throws "divide by zero"

2010-03-23 Thread G B
I won't clutter the discussion with the full traceback unless someone would find it interesting, but the hg_sage command failed with: TypeError: 'NoneType' object is unsubscriptable. I did enter the entire URL, I didn't just paste the abbreviated URL displayed in the post. On Mar 23, 1:18 am, On

Re: [sage-support] Re: atan2 throws "divide by zero"

2010-03-23 Thread Ondrej Certik
Hi Minh! On Mon, Mar 22, 2010 at 8:55 PM, Minh Nguyen wrote: > Hi Greg, > > On Tue, Mar 23, 2010 at 9:35 AM, G B wrote: >> Hi Ondrej-- >> >> Sorry to turn helpless, but I'm not sure how to apply the patch.  I'm >> working from a binary install for OS X. > > Here is a quick-and-dirty way. I assum

Re: [sage-support] Re: atan2 throws "divide by zero"

2010-03-22 Thread Minh Nguyen
Hi Greg, On Tue, Mar 23, 2010 at 9:35 AM, G B wrote: > Hi Ondrej-- > > Sorry to turn helpless, but I'm not sure how to apply the patch. I'm > working from a binary install for OS X. Here is a quick-and-dirty way. I assume that you are using Sage 4.3.3 or Sage 4.3.4. From the Sage command line,

[sage-support] Re: atan2 throws "divide by zero"

2010-03-22 Thread G B
Hi Ondrej-- Sorry to turn helpless, but I'm not sure how to apply the patch. I'm working from a binary install for OS X. Would I need to rebuild from source, or can I apply the patch to one of the implementation files in the bundle? It looks like you've just changed a lookup table? Thanks for

[sage-support] Re: atan2 throws "divide by zero"

2010-03-19 Thread Alec Mihailovs
Also, simplification might be improved. In particular, sage: atan(sin(1)/cos(1)).full_simplify() arctan(sin(1)/cos(1)) while atan(tan(1)).simplify() 1 Alec Mihailovs -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-sup

Re: [sage-support] Re: atan2 throws "divide by zero"

2010-03-19 Thread Ondrej Certik
On Fri, Mar 19, 2010 at 7:03 PM, Ondrej Certik wrote: > On Thu, Mar 18, 2010 at 5:10 PM, G B wrote: >> Thanks.  I tried that but it's causing different problems: >> --- >> from sympy import atan2 >> var('omega,t,x,y,r,Theta') >> Theta(t)=omega*t >> x(t)=r*cos(Theta(t)) >> y(t)

Re: [sage-support] Re: atan2 throws "divide by zero"

2010-03-19 Thread Ondrej Certik
On Thu, Mar 18, 2010 at 5:10 PM, G B wrote: > Thanks.  I tried that but it's causing different problems: > --- > from sympy import atan2 > var('omega,t,x,y,r,Theta') > Theta(t)=omega*t > x(t)=r*cos(Theta(t)) > y(t)=r*sin(Theta(t)) > dx=diff(x,t) > ddx=diff(dx,t) > dy=diff(y,t)

[sage-support] Re: atan2 throws "divide by zero"

2010-03-18 Thread G B
Thanks. I tried that but it's causing different problems: --- from sympy import atan2 var('omega,t,x,y,r,Theta') Theta(t)=omega*t x(t)=r*cos(Theta(t)) y(t)=r*sin(Theta(t)) dx=diff(x,t) ddx=diff(dx,t) dy=diff(y,t) ddy=diff(dy,t) v_a(t)=atan2(dy(t),dx(t)) v_a

[sage-support] Re: atan2 throws "divide by zero"

2010-03-18 Thread Alec Mihailovs
On Mar 17, 8:38 pm, G B wrote: > atan2(-pi,0) -->  RuntimeError: power::eval(): division by zero > > Any ideas how to get around this? A simple workaround is sage: from sympy import atan2 sage: atan2(-pi,0) -pi/2 Alec Mihaiovs -- To post to this group, send email to sage-support@googlegroup

[sage-support] Re: atan2 throws "divide by zero"

2010-03-17 Thread Alec Mihailovs
On Mar 17, 9:11 pm, G B wrote: > atan2(-pi,0) -->  RuntimeError: power::eval(): division by zero I got the same in the new 4.3.4.rc0 Sage version that I've just installed. Playing with that, I noticed also the following strange thing: sage: n(atan2(-sqrt(2),0)) -1/2*pi While it looks corre

[sage-support] Re: atan2 throws "divide by zero"

2010-03-17 Thread G B
Should have also mentioned: Sage 4.3.3 OS X 10.6.2 64bit Intel MacBook Pro On Mar 17, 5:38 pm, G B wrote: > While waiting to be approved, I think I narrowed this down to a very > simple test case. > > atan2(3,0)   --> 1/2*pi > atan2(-3,0)  --> -1/2*pi > atan2(pi,0)  --> 1/2*pi > atan2(-pi,0) --