HP Forums

Full Version: Two little RPN challenges (11C, 15C ...)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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 !

(1) . 5 !

(2) . 5 CHS ! x^2

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

[/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]

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

- Michael

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