Ticket #6421 (closed defect: fixed)
[with patch, positive review] make a symbolic arctan2 function
| Reported by: | burcin | Owned by: | kcrisman |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.1 |
| Component: | symbolics | Keywords: | |
| Cc: | Author(s): | Karl-Dieter Crisman | |
| Report Upstream: | N/A | Reviewer(s): | Burcin Erocal |
| Merged in: | sage-4.1.rc0 | Work issues: |
Description
From sage-devel:
> On Thu, Jun 25, 2009 at 11:31 PM, Nick
> Alexander<ncalexander@gmail.com> wrote:
> >
> > Can someone verify that this is a bug? Any hope a fix? (This is
> > with sage-4.0.2 on sage.math.)
> >
> > {{{
> > sage: complex_plot((x^2 + I).sqrt().real_part(), (-2, 2), (-2, 2))
> > ---------------------------------------------------------------------------
> ...
> > RuntimeError: cannot find SFunction in table
> > }}}
>
> It seems, its not just complex_plot issue. It is happening for other
> plots. For example, the following works fine in 3.4 but fails with
> the same error in 4.0.2
> -----
> sage: x,y=var('x,y'); plot3d( log(x+I*y).imag(), (x,-2,2), (y,-2,2))
> ...
> RuntimeError: cannot find SFunction in table
> -----
sage: %debug
> /home/burcin/sage/sage-4.0.2.rc0/expression.pyx(3115)sage.symbolic.expression.Expression.operator
> (sage/symbolic/expression.cpp:15268)()
ipdb> u
> /home/burcin/sage/sage-4.0.2.rc0/local/lib/python2.5/site-packages/sage/symbolic/expression_conversions.py(206)__call__()
205
--> 206 operator = ex.operator()
207 if operator is None:
ipdb> print ex
arctan2(real_part(y) + imag_part(x), real_part(x) - imag_part(y))
Both of these fail because Sage doesn't define a symbolic arctan2
function. There is instead a simple wrapper around arctan in
sage/functions/trig.py:
sage: arctan2(x,y)
arctan(x/y)
It's possible that this worked on 4.0, and I broke it with #6244.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

