#11888: Sage is missing the lambert_w function
----------------------------------------------------------------------------------+
   Reporter:  benjaminfjones                                                    
  |          Owner:  burcin                                      
       Type:  defect                                                            
  |         Status:  needs_work                                  
   Priority:  minor                                                             
  |      Milestone:  sage-5.0                                    
  Component:  symbolics                                                         
  |       Keywords:  lambert_w symbolics conversion maxima sd35.5
Work_issues:                                                                    
  |       Upstream:  N/A                                         
   Reviewer:  Keshav Kini, Karl-Dieter Crisman, Fredrik Johansson, Burcin 
Erocal  |         Author:  Benjamin Jones                              
     Merged:                                                                    
  |   Dependencies:  #12507                                      
----------------------------------------------------------------------------------+

Comment(by burcin):

 Replying to [comment:31 benjaminfjones]:
 > I've written a new patch that includes significant changes compared to
 the last one. I think I've included all of burcin's suggestions and I
 think it's much improved now. All tests pass with the patch applied on
 5.0.beta4 + #12507.

 Thanks! The patch looks really good. When checking if the input is 0 in
 `_eval_`, you might want to `return z` instead of `Integer(0)` to preserve
 the type of the input. Similarly, we should return `parent(z)(1)` or
 `parent(z)(-1)` in the other branches.

 <snip>
 > I guess that's because there isn't a two-argument version of lambert_w
 defined in maxima. The conversion maxima -> Sage works (as shown in one of
 the doctests) but it looks like the other way doesn't. Another example:
 >
 > {{{
 > sage: maxima(lambert_w(5))
 > Maxima ERROR:
 >
 > lambert_w: wrong number of arguments.
 >  -- an error. To debug this try: debugmode(true);
 > }}}
 >
 > Q: How do I get around this?

 You need to define `_maxima_init_evaled_()`. See line 895 of
 `sage/fuctions/other.py`:

 http://hg.sagemath.org/sage-
 main/file/c239be1054e0/sage/functions/other.py#l895

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11888#comment:33>
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