Re: Horner's method on subexpressions
- To: mathgroup at smc.vnet.net
- Subject: [mg17422] Re: Horner's method on subexpressions
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 6 May 1999 02:44:26 -0400
- Organization: Universitaet Leipzig
- References: <7gjeaa$cmh@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Ben, does pattern matching help you <your expression> /. Re[a_] :> Re[Horner[a]] Regards Jens Ben Raphael wrote: > > I have a sequence of expressions that contain polynomials and other > terms. An example is an expression of the form: > > 1/2 Re[-2/x^28 + 2(1+x)^56 / x^28] + Re[(1 / (-1 + 2x)^29) (high degree > polynomial in x)]/483298748 > > The polynomials that appear have integer coefficients. What I would > like to do is rewrite this expression by applying the Horner[] function > to the polynomial, in order to speed up evaluation. However, the Horner > function only takes polynomial arguments, so one way to proceed is to > extract the polynomial term, apply Horner and then reconstruct the > expression. Does anyone know an efficient way to do this, or have > method to suggest? > > Thanks, > > Ben Raphael > braphael at ucsd.edu