convert/mathorner - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Conversion : convert/mathorner

convert/mathorner

convert a polynomial to Matrix Horner form

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

convert( poly, mathorner )

convert( poly, mathorner, var )

Parameters

poly

-

polynomial

var

-

(optional) variable

Description

• 

convert/mathorner writes the polynomial poly in the name var in horner or ``nested'' form.

• 

If there is only one indeterminate in poly then it is not necessary to specify the third argument var.

• 

Horner form allows you to evaluate polynomials of Matrices in the most efficient manner. For a polynomial of degree n there will be n adds and n multiplications needed to evaluate the Horner form.

Examples

p567x5+22x455x394x2+87x

p:=7x5+22x455x394x2+87x56

(1)

AMatrix1,3,4,7

A:=1347

(2)

convertp,mathorner

56+87+94+55+227x &* x &* x &* x &* x

(3)

subsx=A,

56+87+94+55+2271347 &* 1347 &* 1347 &* 1347 &* 1347

(4)

`&*`=`.`|`&*`=`.`

14717126811690810645

(5)

eval,x=A,`&*`=`.`

14717126811690810645

(6)

Ppx=%A|px=%A

P:=7%A5+22%A455%A394%A2+87%A56

(7)

convertP,mathorner,%A`&*`=`.`|convertP,mathorner,%A`&*`=`.`

56+87+94+55+227%A.%A.%A.%A.%A

(8)

value

14717126811690810645

(9)

See Also

convert

convert[horner]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam