Re: [Maxima-bugs] [ maxima-Bugs-1407378 ] polarform returns a rectangular expression for float argumen
Subject: Re: [Maxima-bugs] [ maxima-Bugs-1407378 ] polarform returns a rectangular expression for float argumen
From: Raymond Toy
Date: Mon, 16 Jan 2006 16:59:59 -0500
>>>>> "Stavros" == Stavros Macrakis <macrakis at gmail.com> writes:
Stavros> 1. (*) text/plain ( ) text/html
>>
Stavros> ?list(?list(?mexpt,?simp),%e,0.78*%i)
>>
>> Hmm. This particular form is left unevaluated.
Stavros> Well, "unsimplified" -- sorry for the nitpicking, but I think it is relevant
Stavros> here.
Terminology is important, so I should say the right thing.
Stavros> What happens to
Stavros> ?list(?list(?mexpt,?simp),%e,1)
Stavros> or
Stavros> ?list(?list(?mexpt,?simp),2.3,2.2)
(%o5) false
(%i6) ?list(?list(?mexpt,?simp),%e,1);
1
(%o6) %e
(%i7) ?list(?list(?mexpt,?simp),2.3,2.2);
2.2
(%o7) 2.3
Which, I think, makes sense. And from looking at the code for
$polarform, polarform doesn't really do anything to ensure
%e^(0.78*%i) isn't simplified:
(defmfun $polarform (xx)
(cond ((and (not (atom xx)) (memq (caar xx) '(mequal mlist $matrix)))
(cons (car xx) (mapcar #'$polarform (cdr xx))))
(t ((lambda (aas $%emode)
(mul (car aas) (powers '$%e (mul '$%i (cdr aas)))))
(absarg xx) nil))))
The T branch is the relevant one. (absarg xx) returns (1.414
. 0.785).
Ray