matrix Horner form - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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

p7x5+22x455x394x2+87x56

(1)

AMatrix1,3,4,7

A1−347

(2)

convertp,mathorner

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

(3)

subsx=A,

56+87+94+55+2271−347&*1−347&*1−347&*1−347&*1−347

(4)

eval,`&*`=`.`

1471712681−16908−10645

(5)

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

1471712681−16908−10645

(6)

Pevalp,x=%A

P7A5+22A455A394A2+87A56

(7)

evalconvertP,mathorner,%A,`&*`=`.`

56+87+94+55+227A·A·A·A·A

(8)

value

1471712681−16908−10645

(9)

See Also

convert

convert[horner]