Opened 3 years ago

Last modified 21 hours ago

#26752 new defect

Conversion from sympy to sage loses Lambert's W branch argument.

Reported by: charpent Owned by:
Priority: major Milestone: sage-8.5
Component: symbolics Keywords: sympy, conversion
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


See this ask.sagemath question.

sage: Ex
111/1000*t + e^(-3/10*t) - 1
sage: import sympy
sage: sympy.solve(Ex)
[10*LambertW(-100*exp(-100/37)/37)/3 + 1000/111,
 10*LambertW(-100*exp(-100/37)/37, -1)/3 + 1000/111]
sage: [s._sage_() for s in sympy.solve(Ex)]
[10/3*lambert_w(-100/37*e^(-100/37)) + 1000/111,
 10/3*lambert_w(-100/37*e^(-100/37)) + 1000/111]

Change History (2)

comment:1 Changed 23 hours ago by gh-sheerluck

sage: import sympy

sage: sympy.LambertW(-0.1, 0).n()

sage: sympy.LambertW(-0.1, -1).n()

sage: lambert_w(-0.1).n()

sage: lambert_w(-0.1, n=-1).n()
TypeError: __call__() got an unexpected keyword argument 'n'

sage: # so how to get -3.57715206395730 from lambert_w?

comment:2 Changed 21 hours ago by gh-sheerluck

sage: lambert_w(-1, -0.1).n()
Note: See TracTickets for help on using tickets.