An unintuitive mathematical fact:

j^{j}= e^{-pi/2}= 0.207879576where j = sqrt(-1) and j

^{2}= -1

The proof (which is left as an exercise for the reader) requires the use of Euler's identity and trigonometric/hyperbolic identities derived therefrom:

e^{jx}= (cos x) + j*(sin x)sin jx = j * sinh x

cos jx = cosh x

On any RPN or RPL calculator designed and engineered by Hewlett-Packard with complex-number capabilities, j^{j} can always be evaluated correctly. For example:

HP-15C HP-42S1 0

f Re<->Im ENTER

ENTER 1

y^x f CMPLX

ENTER

y^x

For the 32S, 32SII, 33S, and 41C* with Math or Advantage ROM, a different approach is used:

1

ENTER

0

ENTER

1

ENTER

0

f CMPLXy^x XEQ Z^W

(32/33) (41/Math/Adv)

This procedure works for all four calculators, but the 33S gives the incorrect answer e^{-3*pi/2} = 0.008983291 when the zero in the z-register is negated (-0).

The root cause of this problem is the same one that causes the incorrect rectangular-to-polar conversions with 0 or -0 in the x-register, which I and others documented fully, several months ago in this forum.

Calculation of j^{j} requires the calculation of ln(j).

Re [ln(a+jb)] = ln (sqrt(a^{2}+b^{2}))

Im [ln(a+jb)] = atan2(a, b) [in radians] -- primary solution

The antilogarithm of the j residing in the "upper" part of the stack is taken. Since the 33S calculates the phase angle of (-0 + j1) incorrectly, the answer given for j^j is incorrect.

Norris (or anyone else), has HP addressed the polar-angle and other bugs?

-- KS

*Edited: 28 Nov 2004, 12:01 a.m. *