The Museum of HP Calculators

HP Forum Archive 11

[ Return to Index | Top of Index ]

Little HP-15C challenge for the weekend
Message #1 Posted by Ex-PPC member on 13 Mar 2003, 7:41 a.m.

Hi, here's a new, little challenge for all HP-15C fans out there. If you think you know your 15C inside out, this is your chance to prove it:

The challenge

Assume a master-cleared HP-15C. We want to compute the value of e^(-Pi/2) [=0.2078+] on a 15c. The direct way to do it would be:

    PI
    2
    /
    CHS
    e^x   

That's 5 steps. The challenge is to do it in four steps. A simple way would be using trigs, like this:

    1
    SIN-1 (arcsin)
    CHS
    e^x

but that doesn't work on a master-cleared HP-15C, because this procedure assumes radians mode and a master-cleared HP-15C defaults to degrees , so you would need an additional RAD step at the beginning, making 5 total. Can you do it in four ?

By the way, should you be interested in the solution to my latest Short & Sweet Math Challenge #6, I've posted two short, commented programs for the HP-71B, see the post S&SMC#6: An HP-71B solution in its proper thread below.

      
also ...
Message #2 Posted by Ex-PPC member on 13 Mar 2003, 7:54 a.m.,
in response to message #1 by Ex-PPC member

By the way, a little remark is in order:

By "master-cleared" I don't mean an actually all-erased 15C (i.e: Pr Error), but just use the term to state that you cannot depend on any particular mode or register contents, i.e: you cannot assume that RAD mode is set, or even that the X-register initially contains a 0 value (which would be the case after a real "master clear"). If you need a particular mode you must set it, and if you need some definite value in X to begin with, you must put it in there yourself.

      
Re: Little HP-15C challenge for the weekend
Message #3 Posted by Werner Huysegoms on 13 Mar 2003, 10:36 a.m.,
in response to message #1 by Ex-PPC member

I don't even have a 15C, but that's easy, no?

PI CHS e^x SQRT

Werner

            
Re: Little HP-15C challenge for the weekend
Message #4 Posted by Ex-PPC member on 13 Mar 2003, 10:47 a.m.,
in response to message #3 by Werner Huysegoms

Yes ! Give the man a cigar !! (just joking)

Now that you've found a 4-step solution so easily, let's see if you would succeed in finding another 4-step solution that doesn't include any of the four operations you did use, namely without using neither Pi, nor CHS, nor e^x, nor SQRT !!

:-)

If you succeed under those conditions, a cigar won't suffice, you'll deserve the whole box ... (there is such a solution, of course)

                  
Re: Little HP-15C challenge for the weekend
Message #5 Posted by Axel on 13 Mar 2003, 11:34 a.m.,
in response to message #4 by Ex-PPC member

Hello,

I don't have the 15C (longing for it for years...), only read the documentation at the hp-museum about entering complex numbers.

Assuming an empty stack (all levels are zero) it should work like that, unfortunately I can't prove it...

1 fI Enter ^

Best regards Axel

                        
Proof of Axel's solution
Message #6 Posted by Karl Schneider on 14 Mar 2003, 2:33 a.m.,
in response to message #5 by Axel

HP-15C      HP-42S

1 1 f I COMPLEX ENTER ENTER y^x y^x

calculates j^j = exp(-pi/2) ~= 0.20788, where j = sqrt(-1)

THE PROOF =========

Euler's Identity: exp(jw) = cos(w) + j*sin(w)

==> for w = pi/2 radians, exp(j*pi/2) = 0 + j*1 = j

j^j = exp(ln(j^j))

= exp(j*ln(j))

= exp(j*ln(exp(j*pi/2)))

= exp(j*j*pi/2)

= exp(-pi/2)

                              
Re: Proof of Axel's solution
Message #7 Posted by Axel on 14 Mar 2003, 4:23 a.m.,
in response to message #6 by Karl Schneider

Glad to see that it worked that way. "I can't proof" meant I can't check it on a real 15C. However, thank you, Karl for explaining it so nicely.

BTW, what I always missed on my HP calcs (32sii, 48s, 40g) is that there is no direct way to enter i. My nephew's TI-83 e.g. has the i on the keyboard. May be HP decided so because, in everyday math, you don't it so often.

Regards Axel

                                    
Re: Proof of Axel's solution
Message #8 Posted by R Lion on 14 Mar 2003, 11:41 a.m.,
in response to message #7 by Axel

"I always missed on my HP calcs (32sii, 48s, 40g) is that there is no direct way to enter i."

Please, try this on your 48:

i ENTER ENTER y^x ->NUM

Regards.Raul

                                          
Re: Proof of Axel's solution
Message #9 Posted by Karl Schneider on 15 Mar 2003, 12:12 a.m.,
in response to message #8 by R Lion

Raul wrote that

"i ENTER ENTER y^x ->NUM"

will enter i and calculate i^i on an HP-48.

It works! I never knew that. Also, the HP-49G has an "i" entry key. {blue left shift}, (TOOL}

Thanks...

                                                
Re: Proof of Axel's solution
Message #10 Posted by R Lion on 15 Mar 2003, 2:32 a.m.,
in response to message #9 by Karl Schneider

Very happy for helping you: I'm enjoying your "New multiple Varaible 15C Solver"... ;-)

Raul

      
Re: Little HP-15C challenge for the weekend
Message #11 Posted by Karl Schneider on 14 Mar 2003, 12:45 a.m.,
in response to message #1 by Ex-PPC member

Taking advantage of the HP-15C's fine and complete implementation of functionality with domains of complex-valued input and output.

f I ( or, g SF 8)

g COS-1

CHS

e^x

Axel's post below is the cleverest, and quite likely the solution: So, perhaps the trick is to prove that

j^j = exp(-pi/2)

by Euler's identity: exp(j*w) = cos w + j*sin w

and the trig/hyberbolic identities for complex arguments.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall