Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac 2516: fix maxima_lib to properly translate hypergeometric
Browse files Browse the repository at this point in the history
  • Loading branch information
nbruin committed Apr 14, 2014
1 parent ebe4c6a commit bc1d66e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/sage/interfaces/maxima_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ def reduce_load_MaximaLib():
cadadr=EclObject("cadadr")
meval=EclObject("meval")
NIL=EclObject("NIL")
lisp_length=EclObject("length")

## Dictionaries for standard operators
sage_op_dict = {
Expand Down Expand Up @@ -1363,7 +1364,8 @@ def dummy_integrate(expr):
sage.functions.log.polylog : lambda N,X : [[mqapply],[[max_li, max_array],N],X],
sage.functions.other.psi1 : lambda X : [[mqapply],[[max_psi, max_array],0],X],
sage.functions.other.psi2 : lambda N,X : [[mqapply],[[max_psi, max_array],N],X],
sage.functions.log.lambert_w : lambda N,X : [[max_lambert_w], X] if N==EclObject(0) else [[mqapply],[[max_lambert_w, max_array],N],X]
sage.functions.log.lambert_w : lambda N,X : [[max_lambert_w], X] if N==EclObject(0) else [[mqapply],[[max_lambert_w, max_array],N],X],
sage.functions.hypergeometric.hypergeometric : lambda A, B, X : [[mqapply],[[max_hyper, max_array],lisp_length(A.cdr()),lisp_length(B.cdr())],A,B,X]
}


Expand Down Expand Up @@ -1486,7 +1488,7 @@ def sr_to_max(expr):
elif (op in special_sage_to_max):
return EclObject(special_sage_to_max[op](*[sr_to_max(o) for o in expr.operands()]))
elif op == tuple:
return maxima(expr.operands()).ecl()
return EclObject( ([mlist],tuple(sr_to_max(op) for op in expr.operands())) )
elif not (op in sage_op_dict):
# Maxima does some simplifications automatically by default
# so calling maxima(expr) can change the structure of expr
Expand Down

0 comments on commit bc1d66e

Please sign in to comment.