MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Horner scheme function ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4459] Re: Horner scheme function ?
  • From: wagner at motel6.cs.colorado.edu (Dave Wagner)
  • Date: Mon, 29 Jul 1996 02:37:16 -0400
  • Organization: University of Colorado, Boulder
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4shu29$g7n at ralph.vnet.net>,
Manfred Krafczyk <kraft at emma.bauwesen.uni-dortmund.de> wrote:
>Hi all,
>does anybody know where I can find a Mathematica
>function that returns the Horner representation
>of a polynomial or how such a function could be
>constructed from the standard M. function set ?

Is this what you want?

    In[35]:=
    Reverse[CoefficientList[3x^7+2x^4-x,x]]

    Out[35]=
    {3,0,0,2,0,0,-1,0}

    In[36]:=
    Fold[#1x+#2&, First[%], Rest[%]]
    
     Out[36]:=
    x (-1 + x^3 (2 + 3 x^3))

		Dave Wagner
		Principia Consulting
		(303) 786-8371
		dbwagner at princon.com
		http://www.princon.com/princon

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: lost connection to license server
  • Next by Date: Re: ListPlot the output of Print
  • Previous by thread: Re: Horner scheme function ?
  • Next by thread: Pairings