Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!pa.dec.com!rust.zso.dec.com!shlump.nac.dec.com!jareth.enet.dec.com!edp From: edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) Newsgroups: comp.sys.handhelds Subject: Re: Bug in QUAD Message-ID: <20650@shlump.nac.dec.com> Date: 1 Mar 91 14:10:45 GMT References: <89355@tut.cis.ohio-state.edu> Sender: newsdaemon@shlump.nac.dec.com Reply-To: edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) Organization: Digital Equipment Corporation Lines: 27 In article <89355@tut.cis.ohio-state.edu>, adkins@tortoise.cis.ohio-state.edu (Brian Adkins) writes: > x^2 > ----------- = .58 QUAD returns 'x=s1*76.15.../5000' neither one of these > (.02 - x)^2 roots is correct. QUAD works only on quadratic expressions; your equation contains the ratio of two polynomials, but it is not itself a quadratic expression. I suspect that the way QUAD works is to find the second order Taylor's polynomial of the expression you give it. That forces the expression into a known form, which can then be dissected to give the quadratic coefficients. To support this theory, observe that if you use QUAD on an expression containing a function whose derivative is not known to the 48, you get an expression contain "der" in it. E.g., try 'X^2-RE(C)' 'X' QUAD. As another test, I entered your expression and then 'x' 2 TAYLR COLCT to get '2500*X^2=.58'. Taking the QUAD of that produces 'x'=s1*76.1577310586/5000', which is identical to what you got and is the correct solution for the root of the Taylor's polynomial. -- edp (Eric Postpischil) "Always mount a scratch monkey." edp@jareth.enet.dec.com