The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

WP 34S mini-challenge (B)
Message #1 Posted by Gerson W. Barbosa on 26 Dec 2012, 11:59 p.m.

Write a WP 34S program that displays (and keeps displaying) at least the first 10 correct digits of Brun's Constant, B = 1.902160583104 (the last two digits are uncertain). The maximum number of steps is 10, plus one for each additional digit, up to 12 steps (LBL and END included).

Tip: the following approximation may be used:

B ~ Sqrt(Phi*Sqrt(5.0005)) = 1.90216058363
where
Phi = (sqrt(5) + 1)/2
I have only a 10-step solution:
001 LBL B
002 
003
004
005
006
007
008
009
010 END  

B --> 1.90216058363

Gerson.

Edited: 27 Dec 2012, 12:09 a.m.

      
Re: WP 34S mini-challenge (B)
Message #2 Posted by Paul Dale on 27 Dec 2012, 12:13 a.m.,
in response to message #1 by Gerson W. Barbosa

Saved one step immediately:

001: LBL B
002: 5
003: SDR 004
004: RCL+ L
005: [sqrt]
006: # [phi]
007: [times]
008: [sqrt]
009: RTN

Pauli

            
Re: WP 34S mini-challenge (B)
Message #3 Posted by Gerson W. Barbosa on 27 Dec 2012, 12:19 a.m.,
in response to message #2 by Paul Dale

Quote:
004: RCL+ L
D'oh, missed this obvious one!

Gerson.

            
Re: WP 34S mini-challenge (B)
Message #4 Posted by Paul Dale on 27 Dec 2012, 12:21 a.m.,
in response to message #2 by Paul Dale

And adding a correction term takes three more steps, giving 12 digits on the display although the last is off by a bit:

001: LBL B
002: 5
003: SDR 004
004: RCL+ L
005: [sqrt]
006: # [phi]
007: [times]
008: [sqrt]
009: # 53
010: SDR 11
011: -
012: RTN

- Pauli

                  
Re: WP 34S mini-challenge (B)
Message #5 Posted by Gerson W. Barbosa on 27 Dec 2012, 12:29 a.m.,
in response to message #4 by Paul Dale

10 actual steps for 11 correct digits... this is really compact. #52 instead of #53 might be better.

Gerson.

                        
Re: WP 34S mini-challenge (B)
Message #6 Posted by Paul Dale on 27 Dec 2012, 12:32 a.m.,
in response to message #5 by Gerson W. Barbosa

I didn't fiddle with the correction factor, just interested in the displayed value. Pity the correction value is >255 or an extra digit would have been available for free.

I wouldn't be surprised if a shorter sequence were still possible.

- Pauli

                              
(deleted post)
Message #7 Posted by deleted on 27 Dec 2012, 12:35 a.m.,
in response to message #6 by Paul Dale

This Message was deleted. This empty message preserves the threading when a post with followup(s) is deleted. If all followups have been removed, the original poster may delete this post again to make this placeholder disappear.

                                    
Re: WP 34S mini-challenge (B)
Message #8 Posted by Walter B on 27 Dec 2012, 2:31 a.m.,
in response to message #7 by deleted

Quote:
If only B had made into the WP 34S :-)
Is there anything B is good for beyond pure math?

d:-)

                                          
Re: WP 34S mini-challenge (B)
Message #9 Posted by Paul Dale on 27 Dec 2012, 3:09 a.m.,
in response to message #8 by Walter B

What does it matter? More is always better!

- Pauli

                                                
Re: WP 34S mini-challenge (B)
Message #10 Posted by Walter B on 27 Dec 2012, 4:56 a.m.,
in response to message #9 by Paul Dale

Quote:
What does it matter?
Thanks, that suffices as response - now I know ;-)
Quote:
More is always better!
So you prefer 8.5 over 5.8 on the Richter scale?

([:-)

                                          
(deleted post)
Message #11 Posted by deleted on 27 Dec 2012, 8:36 a.m.,
in response to message #8 by Walter B

This Message was deleted. This empty message preserves the threading when a post with followup(s) is deleted. If all followups have been removed, the original poster may delete this post again to make this placeholder disappear.

                                                
Re: WP 34S mini-challenge (B)
Message #12 Posted by fhub on 27 Dec 2012, 9:02 a.m.,
in response to message #11 by deleted

Quote:
Well, in 1994 it played an important role in the discovery of the famous Pentium FDIV flaw:
That's of course a serious reason to include it in the WP34s. ;-)

Go on Pauli ... :-)

Franz

                                                      
Re: WP 34S mini-challenge (B)
Message #13 Posted by Walter B on 27 Dec 2012, 9:31 a.m.,
in response to message #12 by fhub

Oh yes - we won't take any lower grade challenges, will we? ;-)

      
Re: WP 34S mini-challenge (B)
Message #14 Posted by Paul Dale on 27 Dec 2012, 1:00 a.m.,
in response to message #1 by Gerson W. Barbosa

Another approach, it gets thirteen digits in 12 working steps.

001: LBL B
002: # 216
003: SDR 005
004: #058
005: SDR 008
006: #031
007: SDR 10
008: 4
009: SDR 12
010: [cmplx]+
011: +
012: # 019
013: SDR 001
014: +
015: RTN

- Pauli

Edited: 27 Dec 2012, 1:02 a.m.

            
Re: WP 34S mini-challenge (B)
Message #15 Posted by Gerson W. Barbosa on 27 Dec 2012, 11:07 a.m.,
in response to message #14 by Paul Dale

Thank you very much for you interest, Paul.
I am sorry if I may have offended someone else's intelligence by posing a "lower grade challenge". Anyway, this was meant to be a simple mini-challenge.

Gerson

                  
Re: WP 34S mini-challenge (B)
Message #16 Posted by Walter B on 27 Dec 2012, 11:37 a.m.,
in response to message #15 by Gerson W. Barbosa

Oooh, Gerson, you may have got my message wrong :-? I was just referring to Franz' post and meant we won't introduce a mathematical constant for less reasons than unvealing Intel.

d:-)

                  
Re: WP 34S mini-challenge (B)
Message #17 Posted by Paul Dale on 27 Dec 2012, 4:25 p.m.,
in response to message #15 by Gerson W. Barbosa

I thought the challenge was interesting and I'd still be surprised if a better/shorter solution didn't exist. At the very least it helped take my mind off of the pain of my recent tonsillectomy for a while which was a significant benefit personally.

- Pauli

                        
Re: WP 34S mini-challenge (B)
Message #18 Posted by Marcus von Cube, Germany on 27 Dec 2012, 4:39 p.m.,
in response to message #17 by Paul Dale

I hope you'll recover soon.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall