Here is another manifestation of the HP-33S polar-coordinate conversion bug, that was identified by "Steve A" and investigated by me at this link:

Polar Conversion bug in HP-33S

Basically, if a coordinate pair (-0,y) is entered (y not = 0), then the angle of the polar-coordinate conversion is not computed correctly.

This problem is also manifested in the complex-valued natural-logarithm function "CMPLXLN", since:

CMPLXLN (x + i*y) = 0.5*ln (x^{2}+ y^{2}) + i*["atan2" (y, x)]

where "atan2" is the intrinsic function in Fortran and C that gives the correct angle of the polar-coordinate conversion.

It is easy to see that the simplest way to calculate CMPLXLN is to convert the complex-valued input argument into polar coordinates, then take the natural logarithm of the magnitude (radius).

On the 33s, try:

10 ENTER 0 (left shift) CMPLX LN

You will get the correct answer 2.3026 + i*1.5708

Then, try:

10 ENTER 0 +/- (left shift) CMPLX LN

You will get the incorrect answer 2.3026 + i*4.7123 (where 4.7123 = 1.5*pi radians = 270 degrees, which is the angle that "->theta,r" will give).

-- KS

*Edited: 31 Aug 2004, 2:30 a.m. *