The Museum of HP Calculators

HP Forum Archive 11

[ Return to Index | Top of Index ]

Two little RPN challenges (11C, 15C ...)
Message #1 Posted by Ex-PPC member on 28 Mar 2003, 6:07 a.m.

Here's something to try and solve this weekend (though given the level of RPN expertise among this forum's regular visitors, I don't think it'll take long before someone posts the solutions):

Take your beloved 11C/15C (perhaps some other models can be used too: 32S/SII, 42S, ...) out of the safe, and assuming no particular modes or stack/registers contents

1) try and get the value of Sqrt(Pi)/2 [= 0.8862+] in the X-register.

Of course, the simplest solutions in FOUR steps are:

Pi, Sqrt, 2, /

or, using trigonometrics:

rad, 1, tan-1, sqrt

The challenge is to do it in THREE steps or less, without using complex numbers, functions that do give complex results, or even entering complex mode at all. You can use trigonometric functions, including Polar<->Rectangular conversions, as long as you set the angular mode you need.

2) Under the same assumptions (i.e: no particular trig mode, no particular register or stack contents, and not using complex numbers at all), try to get the the value of Pi [=3.1416+] on the X register, but WITHOUT using the Pi function itself or any trigonometric functions at all (sin, cos, tan, and their inverses), and that includes Rectangular<->Polar conversions as well.

If you succeed, try to do it in 5 steps or less.

That's all, have a nice weekend !

      
Re: Two little RPN challenges (11C, 15C ...)
Message #2 Posted by hugh on 28 Mar 2003, 11:29 a.m.,
in response to message #1 by Ex-PPC member

(1) . 5 !

(2) . 5 CHS ! x^2

      
Re: Two little RPN challenges (11C, 15C ...)
Message #3 Posted by Michael F. Coyle on 28 Mar 2003, 6:25 p.m.,
in response to message #1 by Ex-PPC member

1) try and get the value of Sqrt(Pi)/2 [= 0.8862+] in the X-register. (<= 3 steps)

[.][5][x!]

2) ...try to get the the value of Pi [=3.1416+] on the X register. (<= 5 steps)

[1][8][0][->RAD]

(You didn't say we couldn't use conversions.)

I also have an 11-step solution for this but the margin is too small to hold it.

Have a good weekend.

- Michael

      
Re: Two little RPN challenges (11C, 15C ...)
Message #4 Posted by J. Osugi (Northern Italy) on 29 Mar 2003, 8:45 p.m.,
in response to message #1 by Ex-PPC member

[/pre] > 1) try and get the value of Sqrt(Pi)/2 [= 0.8862+] in the X-register. [/pre] [/pre] Sqrt(pi)/2 can be rewritten as Sqrt(pi/4)[/pre] and pi/4 radians is equal to 45 degrees, so that[/pre] one possible solution is:[/pre] [/pre] HP32SII: 45 ->RAD Sqrt[/pre] [/pre]Well, I realize this is too simple. :-) [/pre] [/pre]-- [/pre]

            
Re: Two little RPN challenges (11C, 15C ...)
Message #5 Posted by Michael F. Coyle on 29 Mar 2003, 8:56 p.m.,
in response to message #4 by J. Osugi (Northern Italy)

That's clever and so obvious once you see it. I'm kind of annoyed that I didn't think of it myself!

- Michael

            
Re: Two little RPN challenges (11C, 15C ...)
Message #6 Posted by Patrick on 3 Apr 2003, 2:39 p.m.,
in response to message #4 by J. Osugi (Northern Italy)

Well, it seems that the parameters of this challenge are a bit ill defined. If entering the number "45" is considered one step, then I have a one step solution:

0.8862269255


[ Return to Index | Top of Index ]

Go back to the main exhibit hall