Polynomial with real coefficients —> array w/ real coeff
11-22-2021, 05:12 PM
Post: #2
 Albert Chan Senior Member Posts: 2,710 Joined: Jul 2018
RE: Polynomial with real coefficients
Hi, Gil

This may be what you wanted.

(10-26-2020 04:25 PM)Albert Chan Wrote:
(10-24-2020 02:03 PM)John Keith Wrote:  'X^5-19*X^4+79*X^3+146*X^2-1153*X+1222'

Is there a command to convert this symbolic polynomial form to an array

XCas has symy2poly, but I can't find one for HP50G

XCas> symb2poly((x+1)*(x+2)*(x+3)) ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → poly1[1, 6, 11, 6]

Code:
≪ 0 OVER DEGREE → D    ≪ 3. DUP D + FOR k HORNER k ROLLD NEXT       + + D 1 + →ARRY    ≫ ≫

Save above to, say, PARRY

hp50g> '(X+1)*(X+2)*(X+3)'
hp50g> PARRY ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → [1 6 11 6]
hp50g> PROOT ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → [-1. -2. -3.]

hp50g> 'X^5-19*X^4+79*X^3+146*X^2-1153*X+1222'
hp50g> PARRY ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → [1 -19 79 146 -1153 1222]
 « Next Oldest | Next Newest »

 Messages In This Thread Polynomial with real coefficients —> array w/ real coeff - Gil - 11-22-2021, 03:09 PM RE: Polynomial with real coefficients - Albert Chan - 11-22-2021 05:12 PM RE: Polynomial with real coefficients - Gil - 11-22-2021, 05:51 PM RE: Polynomial with real coefficients - Gil - 11-23-2021, 11:23 AM RE: Polynomial with real coefficients —> array w/ real coeff - Gil - 11-24-2021, 03:02 PM RE: Polynomial with real coefficients —> array w/ real coeff - Gil - 11-27-2021, 03:33 PM RE: Polynomial with real coefficients —> array w/ real coeff - gor1060 - 05-05-2023, 07:57 AM RE: Polynomial with real coefficients —> array w/ real coeff - rprosperi - 05-05-2023, 12:03 PM RE: Polynomial with real coefficients —> array w/ real coeff - Gil - 05-05-2023, 02:03 PM RE: Polynomial with real coefficients —> array w/ real coeff - gor1060 - 05-08-2023, 12:07 PM

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