Reputation: 276
Let's assume some maxima function gave me a fraction as result. For example
(%o1) bla / blubb
where bla and blubb are again more complicated expressions.
Now I want to process numerator and denominator separately. How can I extract them to separate variables?
I know bla/blubb
is internally represented as a list in lisp, so I could do
:lisp (setq $oneofthem (nth 2 $%o1));
to get the lisp representation of numerator or denominator. However, I feel the maxima and lisp representation differ in commutation, so I'm not sure in advance if the maxima variable oneofthem
contains the first or second factor (either bla
or (mtimes blubb -1)
).
Upvotes: 0
Views: 1243