trigrat(sin(1)) => Error: $%I is not of type LIST.
Fix: in $listofei (trigrat.lisp), replace
(cond ((and
(CONSP VAR)
(CONSP (CAR VAR))
(equal (caar var) 'mexpt)
(equal (cadr var) '$%e)
(equal (caaaddr var) 'mtimes)
(equal (cadaddr var) '$%i))
(setq $lexp (cons var $lexp))
...
with
(cond ((and
(mexptp var)
(equal (cadr var) '$%e)
(mtimesp (caddr var))
(eq (cadr (caddr var)) '$%i))
(setq $lexp (cons var $lexp))
...
Raymond Toy
2003-08-02
Logged In: YES
user_id=28849
If I do this, trigrat(sin(1)) returns
-(%I*(SIN(1)*SIN(2)+COS(1)*COS(2)-COS(1))
-COS(1)*SIN(2)+SIN(1)*COS(2)-SIN(1))
/(2*SIN(1)^2+2*COS(1)^2)
Is that really right? (The numerical value is right.)
Stavros Macrakis
2003-08-02
Logged In: YES
user_id=588346
Trigrat does some ugly things. I am not sure what it is
*supposed* to return for sin(1) -- perhaps sin(1)? -- but at
least (1) what it does return is correct and (2) it doesn't give
an error.
Raymond Toy
2003-08-03
Raymond Toy
2003-08-03
Logged In: YES
user_id=28849
Suggested fix applied.