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....