The Museum of HP Calculators

HP Forum Archive 15

[ Return to Index | Top of Index ]

Complex Solving w HP15C?
Message #1 Posted by Matti Övermark on 27 July 2005, 10:02 a.m.

Hello Fellows,

I recall somebody mentioned that the solver built in into the HP-15C actually could be used to (numerically of course) solve complex roots. I did it in high school back in the early 80s, but being old has its disadvantages... ;). Anyone remember? I RCL flag 8 was set and that there was an swaprecall of the imaginary and real registers multiplied and absolutevalued = 0.

/Matti

      
Re: Complex Solving w HP15C?
Message #2 Posted by Miki Mihajlovic on 27 July 2005, 10:06 p.m.,
in response to message #1 by Matti Övermark

From HP-15 Advanced Function Handbook:

"The SOLVE and INTEGRATE functions use algorithms that sample your function at values along the real axis. In Complex mode, these functions operate with only the real stack, even though your function subroutine may have complex computations in it.

For example, SOLVE will not search for the roots of a complex function, but rather will sample the function on the real axis and search for a zero of the function's real part..."

In the other words, you have to write a program that will solve for imaginary roots. There are some examples in the handbook.

            
Re: Complex Solving w HP15C?
Message #3 Posted by Matti Övermark on 28 July 2005, 4:51 a.m.,
in response to message #2 by Miki Mihajlovic

Ok, thanks. /Matti

      
Re: Complex Solving w HP15C?
Message #4 Posted by Karl Schneider on 29 July 2005, 2:50 a.m.,
in response to message #1 by Matti Övermark

Matti posted,

Quote:
I recall somebody mentioned that the solver built in into the HP-15C actually could be used to (numerically of course) solve complex roots. I RCL flag 8 was set and that there was an swaprecall of the imaginary and real registers multiplied and absolutevalued = 0.

Miki responded,

Quote:
From HP-15 Advanced Function Handbook:

"The SOLVE and INTEGRATE functions use algorithms that sample your function at values along the real axis. In Complex mode, these functions operate with only the real stack, even though your function subroutine may have complex computations in it.

For example, SOLVE will not search for the roots of a complex function, but rather will sample the function on the real axis and search for a zero of the function's real part..."

In the other words, you have to write a program that will solve for imaginary roots. There are some examples in the handbook.


Based on the info from the AFH (which I have, and a scan on CD/DVD can be purchased from this website), it's quite easy to solve for the imaginary part of a complex-valued function: Calculate the function in Complex mode (SF 8), then do Re<>Im just before RTN in the function to leave the imaginary part as the return value of the function.

Complex-valued roots are a bit more complicated, but it seems that you might be referring to the technique and program listed on pp. 80-85 in the AFH. It uses SF 8, Re<>Im, as well as ABS on a complex-valued residual, to solve for complex-valued roots of a general equation (not merely a polynomial).

Quote:
I did it in high school back in the early 80s, but being old has its disadvantages... ;).

Hey! "Old"? I graduated high school in 1981....


[ Return to Index | Top of Index ]

Go back to the main exhibit hall