And another 12c mini-challenge (phi) - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: And another 12c mini-challenge (phi) (/thread-145811.html) And another 12c mini-challenge (phi) - Paul Dale - 01-15-2009 After the rather difficult pi challenge, I thought I'd propose another (hopefully) easier challenge. This time we're after the golden ratio, phi, which is approximately 1.6180339887... Now, the obvious six command / seven keystroke sequence on the 12c is: ``` 5 g-sqrt 1 + 2 / ``` This results in 1.618033989 on the display (assume FIX 9 is already set). I think it would be difficult to better this but I would be very interested in a shorter sequence if such is found. However, let us presume for some unknown reason that we want the resulting digits correct and unrounded. That is, we want 1.618033988 on the display. Now clearly this can be done in four additional steps/keystrokes with ``` 5 sqrt 1 + 2 / EEX 9 CHS - ``` However, it can be done with fewer. Specifically, it can be done in at most the same number of operations and keystrokes as the correctly rounded version I gave initially. That is, six operations maximum and seven keystrokes maximum. Is anybody up to this challenge? - Pauli Re: And another 12c mini-challenge (phi) - Namir - 01-15-2009 How about [3] [6] [cos] [2] [x] You get phi. I assume the angle mode is degrees. Namir Re: And another 12c mini-challenge (phi) - Paul Dale - 01-15-2009 Nice solution, which for some reason I didn't remember. Still it would save a key stroke on a 15c. However, we're on a 12c which doesn't have COS and I asked for phi unrounded which is (phi - 10^-9). - Pauli edit: got the keystroke count wrong edit: and then realised I hadn't Edited: 15 Jan 2009, 11:18 p.m. after one or more responses were posted Re: And another 12c mini-challenge (phi) - Namir - 01-15-2009 You are right. There is no cos in the 12c. However, one who needs to work with phi will most likely use an 11c, 15c, 41c, 42s, and so on. So why not use the more appropriate tool? Namir Re: And another 12c mini-challenge (phi) - Paul Dale - 01-15-2009 This is a challenge and for scientific things the 12c is often not the best suited which makes it more interesting... - Pauli Re: And another 12c mini-challenge (phi) - Namir - 01-15-2009 So how is it best suited for trig functions (for example)? It takes pretty much a long set of keystrokes to emulate predefined trig functions in the scientific calculators. I learned that it is better to work smarter than harder. Re: And another 12c mini-challenge (phi) - Anthony L. Mach - 01-15-2009 It looks like replacing EEX 9 CHS - with 1 - 1/x seems to do the trick as well. Interesting... Tony Re: And another 12c mini-challenge (phi) - Paul Dale - 01-15-2009 Yes, one of the many self referential formulas involving phi rounds the other way. Unfortunately, 9 commands / 10 keystrokes. - Pauli Re: And another 12c mini-challenge (phi) - Chris Dean - 01-16-2009 How about the ratio of two consecutive Fibonacci numbers? 196418 enter 121393 / = 1.6180339887... (displayed as 1.618033989) Regards Chris Dean Re: And another 12c mini-challenge (phi) - Namir - 01-16-2009 Chris, That requires "beaucoup" keystrokes!!! Namir Re: And another 12c mini-challenge (phi) - Namir - 01-16-2009 I forgot to mention that MY Hp-12C has a COS key!!! Minor detail! Sorry! Edited: 16 Jan 2009, 9:54 a.m. Re: And another 12c mini-challenge (phi) - Chris Dean - 01-16-2009 Ah but so simple Re: And another 12c mini-challenge (phi) - Namir - 01-16-2009 I think Paul is counting keystrokes. The one that is even simpler is to simply type they value of phi. :-) Namir Re: And another 12c mini-challenge (phi) - Paul Dale - 01-16-2009 Time for a hint. Skip this post if you want to try the challenge unaided. ``` ``` The formula I used for phi (sqrt(5) + 1)/2 is still used, however you'll have to juggle the percentages to obtain the answer. - Pauli Re: And another 12c mini-challenge (phi) - Gerson W. Barbosa - 01-16-2009 Obviously this is not a solution, just a different way to get phi on the 12C: ```01 1 02 sqrt 03 PSE 04 1 05 + 06 GTO 02 ``` After 19 or so iterations it will display the unrounded value of phi. However the next ones will show the properly rounded answer. There is another 9-step solution around but it will take too long before the answer briefly appears :-) Gerson. Re: And another 12c mini-challenge (phi) - Namir - 01-16-2009 Here is an approximation for phi that has a 5-decimal accuracy: [5] [LN] [9] [EEX] [CHS] [3] [+] Seven steps. Namir Edited: 16 Jan 2009, 9:13 p.m. Re: And another 12c mini-challenge (phi) - Paul Dale - 01-18-2009 Even with the hint, no success :-( I was seeking this solution: ``` 5 SQRT 5 delta% 2 %T ``` - Pauli Edited: 18 Jan 2009, 3:58 p.m.