Post Reply 
Polynomial with real coefficients —> array w/ real coeff
11-22-2021, 03:09 PM (This post was last modified: 11-24-2021 12:21 AM by Gil.)
Post: #1
Polynomial with real coefficients —> array w/ real coeff
I could not find a suitable program to get the real coefficients of a polynomial in form of an array.

So I prepared one, indeed somewhat "bulky", but working smoothly.

As the variable of the polynomial may already be defined in the current directory, the program changes its original name in the expression into another weird dummy variable X__, to be itself transformed back, at the end, to its original name after adequate string manipulations.

Enter for example
'2*(t+4*(5+10))-7*t^6'

Press P—>ARR

To get
'2*(t+4*(5+10))-7*t^6' (original expression in stack level 2)
'-7*t^6+2*t+120' (simplified expression in stack level 1)
:[ana0]: [ -7 0 0 0 0 2 120 ] (coefficients requested with label).

The program will also detect incorrect similar variable names and give a corresponding message warning (as only 1 variable is allowed).

Regards,
Gil Campart


Attached File(s)
.doc  P_ARR.Ver01c.Doc (Size: 1.61 KB / Downloads: 8)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Polynomial with real coefficients —> array w/ real coeff - Gil - 11-22-2021 03:09 PM



User(s) browsing this thread: 1 Guest(s)