(42S) Polynomial Operations
|
01-11-2019, 01:37 PM
Post: #2
|
|||
|
|||
RE: (42S) Polynomial Operations
Delving into my archives again..
The following will take a vector with the coefficients in Y and x in X Y: [ an an-1 ... a1 a0 ] X: x and calculate P(x), P'(x) and P"(x) simultaneously: Code: 00 { 51-Byte Prgm } So, for your example polynomial P(x) = 2*x^3 - x^2 + 5*x + 7 Create a 1x4 matrix [2 -1 5 7] put -3 on the stack and execute P3 to get T: -38 Z: 65 Y: -71 X: [2 -1 5 7] P(-3) = -71 P'(-3) = 65 P"(-3) = -38 Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(42S) Polynomial Operations - Eddie W. Shore - 01-11-2019, 04:59 AM
RE: (42S) Polynomial Operations - Werner - 01-11-2019 01:37 PM
RE: (42S) Polynomial Operations - Albert Chan - 01-11-2019, 03:51 PM
RE: (42S) Polynomial Operations - rprosperi - 01-12-2019, 12:27 AM
RE: (42S) Polynomial Operations - Dieter - 01-12-2019, 08:41 AM
RE: (42S) Polynomial Operations - Thomas Klemm - 01-12-2019, 06:48 AM
RE: (42S) Polynomial Operations - rprosperi - 01-12-2019, 02:20 PM
|
User(s) browsing this thread: 3 Guest(s)