The Museum of HP Calculators

HP Forum Archive 10

 Polynomials solver for 42: WANTEDMessage #1 Posted by R Lion on 11 Feb 2003, 3:12 p.m. Something like the "Solve Poly..." application of 48/49: given the coefficients, get the solutions... Raul

 Re: Polynomials solver for 42: WANTEDMessage #2 Posted by Ex-PPC member on 12 Feb 2003, 4:19 a.m.,in response to message #1 by R Lion The translated HP-67 program you're trying to load and run is far from optimal, or even efficient. Your best best would be to get one from the former "HP-41C User's Library", or even better, to look for one in the old issues of the PPC Journal, available in CD-ROM. If you do have or can get an HP-71B with a Math ROM, this is the "program" that will do what you want, particularized for a 100th-degree polynomial: 10 DIM P(101) @ COMPLEX R(100) @ MAT INPUT P @ MAT R=PROOT(P) @ MAT DISP R I quoted "program" because you could easily execute that from the command line, no need to enter a program. As written, it does the following: ``` DIM P(101) dimensions a 101-element vector to hold the 101 coefficients COMPLEX R(100) dimensions a 100-element complex vector to hold the 100 complex roots MAT INPUT P prompts the user for each element. The user can enter elements one by one or several at a time, and can enter numbers or expressions, even using variables and functions MAT R=PROOT(P) computes all 100 complex roots MAT DISP R displays all roots ``` To make it general, just ask for the degree N, and then use DIM P(N+1) and COMPLEX R(N) instead. That's it. Amazingly simple and powerful !

 Re: Polynomials solver for 42: WANTEDMessage #3 Posted by R Lion on 12 Feb 2003, 10:02 a.m.,in response to message #2 by Ex-PPC member Thanks... but I've not a 71B. It seems this calc has a PROOT. The 48 has it too, but not the 42, and that is what I'm looking for. Raul BTW: I didn't get the 67 prg works (or is veeery slow and I stop the prg before it finds the roots. But I am not sure even how to give it the coefficients)

Go back to the main exhibit hall