|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 !