DM42: all complex roots

Discussion around the Swiss Micros DM42 calculator.
Post Reply
User avatar
salvomic
Posts: 184
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

DM42: all complex roots

Post by salvomic »

hi,
I wonder for a simple, short program to get all complex roots from a number (real or complex), like the function which is in the Math 1 pack for HP41CX.

Maybe with a simple menu...

In the 41 + Math 1 pack we have this:

Code: Select all

Z "img"
Y "real"
X nRth
XEQ "Z↑1/N"
then R/S nth times, that displays U= and V=

In DM42 we could input directly a complex (u, v) and with XEQ (and R/S) get all the roots...
Any help?

Thank you.
Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
DaveGary
Posts: 10
Joined: Fri Jul 21, 2017 11:08 pm

Re: DM42: all complex roots

Post by DaveGary »

salvomic,

This is not exactly what you were looking for, but it is a complex root finder for real and complex numbers. I wrote this a few years ago for use on my HP 28S (different code) calculator. I did a quick and dirty adaptation for the DM42. Put the .raw file into the Programs file of your disk. Exit out to the main screen and XEQ cplxr. Go in to the Solver, Shift-7, and hit the CPLXR menu key. You should see the menu keys: Z N K.

Example: Put in -27 for Z. Put in 3 for N and then put 0 into K. Hit R/S. The 0th root of a negative number is complex. You should see a 0 in Y and the complex result in X. Now, put a 1 into K and hit R/S. You should see a 1 in Y and the real root in X (obviously, a -3). For the final root, put a 2 into K and hit R/S. You should see a 2 in Y and the other complex root in X. That's all the roots for the cube root of -27. You just need to remember that to calculate all of the roots of a real or complex number the K value should always start at zero and end with a number one less that the number of roots you are calculating.

I hope this helps.
cplxr.raw
Solver program to calculate real and complex roots of any real or complex number.
(53 Bytes) Downloaded 38 times
Dave
User avatar
salvomic
Posts: 184
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: DM42: all complex roots

Post by salvomic »

hi Dave,
many thanks.
I'll try it soon.
For now I wish you a Merry Christmas :)

Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
DaveGary
Posts: 10
Joined: Fri Jul 21, 2017 11:08 pm

Re: DM42: all complex roots

Post by DaveGary »

Merry Christmas to you, also.

Modify the code any way you wish to get the output however you want it.
User avatar
salvomic
Posts: 184
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: DM42: all complex roots

Post by salvomic »

DaveGary wrote:
Fri Dec 25, 2020 8:32 pm
Merry Christmas to you, also.

Modify the code any way you wish to get the output however you want it.
thank you!
I installed it it is ok and it seems to be very nice.
I'll test this evening and tomorrow.

Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
Post Reply