#11888: Sage is missing the lambert_w function conversion from Maxima
------------------------------+---------------------------------------------
Reporter: benjaminfjones | Owner: burcin
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.0
Component: symbolics | Keywords: lambert_w symbolics conversion
maxima sd35.5
Work_issues: | Upstream: N/A
Reviewer: | Author: Benjamin Jones
Merged: | Dependencies:
------------------------------+---------------------------------------------
Comment(by fredrik.johansson):
Yes, it should be easy; just add an optional branch parameter, lambertw(z,
branch=0).
Another suggestion is to use scipy.special.lambertw for evaluation over
RDF and CDF. The !SciPy implementation is a Cython translation of the
double precision version in mpmath; it supports all branches and has
excellent numerical stability, and runs quite a bit faster.
{{{
import scipy.special
import mpmath
timeit("mpmath.lambertw(-35.0r+4.6jr,2r)")
timeit("mpmath.fp.lambertw(-35.0r+4.6jr,2r)")
timeit("scipy.special.lambertw(-35.0r+4.6jr,2r)")
print repr(complex(mpmath.lambertw(-35.0r+4.6jr,2r)))
print repr(mpmath.fp.lambertw(-35.0r+4.6jr,2r))
print repr(scipy.special.lambertw(-35.0r+4.6jr,2r))
625 loops, best of 3: 301 µs per loop
625 loops, best of 3: 65.1 µs per loop
625 loops, best of 3: 6.75 µs per loop
(0.91763023745202721+14.071606637742889j)
(0.91763023745202721+14.071606637742889j)
(0.91763023745202721+14.071606637742889j)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11888#comment:15>
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.