Two little RPN challenges (11C, 15C ...)



#2

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 !


#3

(1) . 5 !

(2) . 5 CHS ! x^2

#4

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

#5

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


#6

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

- Michael

#7

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PRIME] RPN: another attempt at returning more than one value to the RPN stack Marcus von Cube, Germany 5 2,497 11-05-2013, 02:44 AM
Last Post: Marcus von Cube, Germany
  HP 11C/12C/15C/16C case Philippe Cairic 4 2,127 11-06-2012, 06:04 PM
Last Post: Matt Agajanian
  Original 15C Keyboard Test Works With 15C LE!!! DigiGal 5 2,250 09-26-2011, 07:33 PM
Last Post: M. Joury
  After the 15c LE, better chance of a basic RPN calc from HP now? nick lidakis 80 15,930 09-18-2011, 08:15 AM
Last Post: snaggs
  A Most Unusual Number, on the 10c/11c/12c/15c Katie Wasserman 8 2,456 07-15-2010, 03:53 AM
Last Post: Katie Wasserman
  A simple 11c/15c mini-challenge (phi) Gerson W. Barbosa 28 5,964 08-21-2009, 01:44 PM
Last Post: Gerson W. Barbosa
  New Iphone & Itouch calculator - Access RPN and Active RPN Nigel Bamber 1 1,182 06-10-2009, 04:13 PM
Last Post: Jean-Michel
  Another calculator with RPN (Corvus 500 RPN) Saile (Brazil) 7 2,225 03-31-2009, 12:14 AM
Last Post: Michael de Estrada
  More Challenges Chuck 7 2,124 02-03-2009, 08:49 AM
Last Post: David Hayden
  11c, 15c, 16c slip case variations question pespen 1 938 07-14-2008, 02:58 PM
Last Post: Eric Smith

Forum Jump: