From: SourceForge.net <noreply@so...>  20061227 16:08:21

Bugs item #1613390, was opened at 20061211 11:17 Message generated for change (Settings changed) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1613390&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Lisp Core  Solving equations Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: find_root evaluates its arguments strangely Initial Comment: Someone asked a question on the mailing list about using the output of solve to do numerical root finding. we found that you could not use the output of solve directly in find_root because it evaluates its first argument strangely. Instead it required explicit evaluation with the '' operator. This behavior is very confusing even for relatively advanced maxima users, but especially for new users. example of the problem below: Transcript Maxima 5.10.0 http://maxima.sourceforge.net Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL) (%i1) h1(s):=1/(1+tau[1]*s); h2(s):=1/(1+tau[2]*s); x(s):=1/s; tau[1]:33e6; tau[2]:33e6; eqn:first(solve(ilt(h1(s)*h2(s)*x(s),s,t)=0.1,t)); 1 (%o1) h1(s) :=  1 + tau s 1 (%i2) 1 (%o2) h2(s) :=  1 + tau s 2 (%i3) 1 (%o3) x(s) :=  s (%i4) (%o4) 3.2999999999999996E5 (%i5) (%o5) 3.2999999999999996E5 (%i6) `rat' replaced 3.2999999999999996E5 by 33//1000000 = 3.3000000000000003E5 `rat' replaced 0.9 by 9//10 = 0.9 1000000 t  33 297 %e  330 (%o6) t =  10000000 (%i7) find_root(%,t,0,2); Maxima encountered a Lisp error: Error in MACSYMATOPLEVEL [or a callee]: ((MEQUAL SIMP) $T ((MTIMES SIMP) ((RAT SIMP) 1 10000000) ((MPLUS SIMP) 330 ((MTIMES SIMP) 297 ((MEXPT SIMP) $%E ((MTIMES SIMP) ((RAT SIMP) 1000000 33) $T)))))) is not of type (OR RATIONAL LISP:FLOAT).  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1613390&group_id=4933 