#11423: Make atan2(0,0) consistent
-------------------------+--------------------------------------------------
   Reporter:  kcrisman   |          Owner:  burcin    
       Type:  defect     |         Status:  new       
   Priority:  major      |      Milestone:  sage-4.7.1
  Component:  symbolics  |       Keywords:            
Work_issues:             |       Upstream:  N/A       
   Reviewer:             |         Author:            
     Merged:             |   Dependencies:            
-------------------------+--------------------------------------------------
Description changed by kcrisman:

Old description:

> This is bad:
>
> {{{
>     sage: atan2(0,0)
>     0
>     sage: atan2(0,0,hold=True)
>     arctan2(0, 0)
>     sage: atan2(0,0,hold=True).n()
>     ValueError: arctan2(0,0) undefined
>     sage: atan2(0,0,hold=True).simplify()
>     -----------------------------------------------------
>     TypeError: Error executing code in Maxima
>     CODE:
>         sage1 : atan2(0,0)$
>     Maxima ERROR:
>
>     atan2: atan2(0,0) is undefined.
>      -- an error. To debug this try: debugmode(true);
> }}}
>
> Probably we should make sure that atan2(0,0) always raises an error.
> Wolfram Alpha/Mathematica gives the interval from -pi to pi, which seems
> as good as any answer, and who knows what others do.
>
> Originally reported at
> [http://ask.sagemath.org/question/578/atan2-bug|ask.sagemath.org].

New description:

 This is bad:

 {{{
     sage: atan2(0,0)
     0
     sage: atan2(0,0,hold=True)
     arctan2(0, 0)
     sage: atan2(0,0,hold=True).n()
     ValueError: arctan2(0,0) undefined
     sage: atan2(0,0,hold=True).simplify()
     -----------------------------------------------------
     TypeError: Error executing code in Maxima
     CODE:
         sage1 : atan2(0,0)$
     Maxima ERROR:

     atan2: atan2(0,0) is undefined.
      -- an error. To debug this try: debugmode(true);
 }}}

 Probably we should make sure that atan2(0,0) always raises an error.
 Wolfram Alpha/Mathematica gives the interval from -pi to pi, which seems
 as good as any answer, and who knows what others do.

 Originally reported at [http://ask.sagemath.org/question/578/atan2-bug
 ask.sagemath.org].

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11423#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en.

Reply via email to