Commit 380659ed authored by ulrich_y's avatar ulrich_y

Bug-fix: Complex arguments aren't treated properly in mathematica

parent 5d80ae02
......@@ -11,7 +11,11 @@
:Evaluate:
args2r[a_]:=Re[N[a/.SubPlus|SubMinus->Identity]];
args2i[a_]:=Im[N[a/.SubPlus|SubMinus->Identity]];
args2e[a_]:=Switch[Head[#], SubPlus, 1, SubMinus, -1, _, 1]& /@ a;
args2e[a_]:=Switch[Head[#],
SubPlus, 1,
SubMinus, -1,
Complex, Sign[Im[#]],
_, 1]& /@ a;
:Begin:
:Function: gpl
:Pattern: G[a__]/;And @@ (NumberQ /@ ({a} /. SubPlus | SubMinus -> Identity))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment