e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 (/thread228637.html) 
e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gerson W. Barbosa  08062012 Does anyone remember this old xkcd comic strip?
Evaluate the expression in the subject title on the WP 34S. You might want to set double precision on, or check it out at WA:
I found it yesterday, when playing with the WP 34S in double precision while waiting for Curiosity to land on Mars. There are no evidence the extra terms have any mathematical meaning though. The closeness to 20 in e^{pi}  pi is believed to be just a coincidence, by the way.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Matt Agajanian  08062012 Well, for the posted expression, I got 20(10^8) on my HP25C.
Edited: 6 Aug 2012, 2:29 p.m.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gerson W. Barbosa  08062012 Hello Matt,
The correct 10, 12 or even 16digit result would be 20, but onedigit difference in the last position is quite acceptable. e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 = 20.000 000 000 000 000 729 511Regards,
Gerson.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Matt Agajanian  08062012 Well, for a Woodstock model, the accuracy is quite impressive. Haven't tried it on my Classics, though.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Paulo MO  08062012 20.00000001 (15C, 41CV)
Paulo
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Peter A. Gebhardt  08062012 19,99999999999999 on an HP200LX (Emulator) ... ;) HP Calculator, Version 1.0, 1990,1993 in DOSBox with Win7
Best regards
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gerson W. Barbosa  08062012 19,99999999999999, both on the emulator and on the real HP200LX when solving EXP(PI)PI+9/1E4+1/(1E4*LN(2)+SQRT(10)/6)^2=X for X. Best regards, Gerson.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Bart (UK)  08072012
Quote:This reminds me of Kahan's discussion "How accurate is accurate enough? " in A Logarithm Too Clever by Half. Edit: On the 50g to 250 digits using longfloat v3.93: 20.000000000000000729511118583827559785599660921569
Edited: 7 Aug 2012, 8:01 a.m.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gilles Carpentier  08072012 Both 50g and 3çgII : 20. exactly
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Paul Dale  08072012 Quote: But are they correctly rounded? At least for the single precision result?
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Bart (UK)  08072012 Ideally for the single precision it should be rounded to: 20 Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Les Koller  08072012
Edited: 7 Aug 2012, 11:51 a.m.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gerson W. Barbosa  08072012 TI57: 20, exactly. Rather than closeness to the actual result, I would like to call the attention to near integers, however. Almost Integer, or NearInteger, is an interesting topic in Recreational Mathematics. Another example:
2*(e  atan(e)) = 2.9999979 (sticking to the TI57, for a change :)
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Bunuel66  08072012 20 on HP 39 GII ;)
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Paul Dale  08072012 That wasn't what I meant :( Is each operation correctly rounded? As opposed to the final result (which you wouldn't expect to be correct given the number of operations involved).
e.g. e^pi = 23.1406926327792690057290863679485473802661....
23.14069263277927  pi = 19.9990999791894767615373566167204971158.... etc.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Paul Dale  08072012 oops, forgot to round PI off to sixteen digits there. Oh well, the idea is the important bit.
 Pauli
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Harald  08072012 Quote:Interesting. Why the difference? I tried my 49g+ and that gives 20 as the 50g does. Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gilles Carpentier  08072012
Quote: It' strange ... If found 20 with my 49G But both 49 / 50G if you are in exact mode and do EVAL >NUM you get 20.0000000001 The EVAL cas does a curious thing with the initial formula : '((3600000000000*LN(2)^2+120000000*sqrt(10)*LN(2)+10000)*EXP(PI)((3600000000000*PI3240000000)*LN(2)^2+(120000000*sqrt(10)*PI108000*sqrt(10))*LN(2)+(10000*PI36009)))/(3600000000000*LN(2)^2+120000000*sqrt(10)*LN(2)+10000)' (??)
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Bart (UK)  08072012 I was wondering why you were concerned about the rounding of the answer instead of being happy with a good result. I should have known better :).
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Dieter  08072012 I think we can safely assume that the 34s, set to 34 digit precision, will get the first 16 right. ;) 001 LBL ANow let's see what the correct result for n digits working precision should look like: 16 [A] 19,99999999999999Does this answer your question ?)
Dieter
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Paul Dale  08072012 Quote: Some of us have less faith :) There most likely will be pathological values where correct rounding won't be achieved but they will be unusual.
Quote: For the sixteen digit result, yes :)
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Bunuel66  08082012 20 on TI 36X Pro
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Dieter  08082012 Quote:Hmhmhmhmhmhmhmmmm.... ;) First of all the obvious: a result of exactly 20 does not mean that the calculator is working perfectly. On the contrary, there is a perfect result for every ndigit machine, and this result is not neccessarily 20. But I think you will know this. :) As far as I know, the TI57 displays 8 digits, but internally it works with 10 digit precision. For a 10digit machine, the perfect result is 20.00000001. So if the TI57 returns exactly 20, it simply is 1 ULP off. BTW the perfect 8digit result is 20.000001. Are you sure you get a plain 20, and not 20.00000001? What do you see in the display if you subtract 20 from the final result? Zero or 1E8? Just curious, ;)
Dieter
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gilles Carpentier  08082012
Dieter wrote : Quote:Why ?
20.000000000000000729511118583827559785599660921569....
I think that the 'perfect' result must be exactly 20 until 16 digits and 20.000000000000001 for 17 digits
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gerson W. Barbosa  08082012 Quote: Yes, I am aware of that. I still remember one of Roger Rosenbaum's lessons on this topic :) http://www.hpmuseum.org/cgisys/cgiwrap/hpmuseum/archv016.cgi?read=103151
Quote:
11 digits, actually: 7 1/x * 10000 = > 1428.5714
Quote: Yes, I am. The first three terms suffice for displaying 20 on the display, and sqrt(10)/6 is not necessary for the exact 20 result. By the way, what is the perfect 11digit result for the complete expression? Just curious (but not curious enough to check it on your nice WP 34S program above :) Cheers, Gerson. _{Edited to fix a typo}
Edited: 8 Aug 2012, 4:14 p.m.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gerson W. Barbosa  08082012 Gilles, By 'perfect result' he means the result we obtain when all intermediate calculations are properly rounded. Please take a look at this old thread: http://www.hpmuseum.org/cgisys/cgiwrap/hpmuseum/archv016.cgi?read=103151 Regards,
Gerson.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Dieter  08082012 If the TI57 actually uses 11 internal digits the result is fine: Both for 11 and 12digit machines the perfect result is a plain 20. However, the last (11th) digit on the 57 seems to be truncated instead of rounded. Take a look at your example: you get 0.5714285 while, correctly rounded, it should be 0.5714286. ;)
BTW, I took that 34s program and inserted some print commands. Here are the intermediate results for 10, 11 and 12 digits: 10 digitsJust in case, if you want to compare this with what you get from the 57. ;)
Dieter
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Dieter  08082012 Gilles, the "perfect result" is the one you get from a perfect calculator. Let's suppose you got a 10digit calculator and you want to evaluate 1/3 x 3. What is the perfect result? First step: 1 / 3 = 0.3333333333If the calculator returns 1 it obviously does something wrong. The point is, that realworld calculators work with limited precision, be it 10, 30 or 50 digits. This means that, for instance, you will never evaluate sqrt(pi), but sqrt(3,141592654). You will never work with 1/3  the best you can get is 0.33333333... For the same reason, the perfect result (i.e. the result from a perfect, errorfree calculator) of this wellknown "Forensic test" is not 9, but 9,000417403 for 10digit machines and 8,99999864267 for those with 12 digits. Now guess which calculators get exactly these results... :) All this is the reason why there are calculators than can do symbolic math. ;)
Dieter
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 (updated)  Walter B  08082012 I keyed in your wonderful little program and get from my WP 34S in ALL 00: 34 [A] 20. [<] 20.000 000 000 000 00 [>] 0 729 511 118 583 827 57FWIW Edited: 9 Aug 2012, 7:25 a.m.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Les Koller  08082012 Good old Windows Calculator in scientific mode :) Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Les Koller  08082012 Google calculator gives 20 exactly.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gerson W. Barbosa  08082012 Quote:
TI57 Whenever the TI57 gets a perfect result, this is due to coincidence only. But we already knew that :)
Gerson.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Les Koller  08082012 Multi Precision RPN Calculator, precision set to 200 decimal places..
19.999200000000000729511118583827559785599660921569043259840768263504850897172305040683344584755775283821628948893194895388850532202280827489024706316143294490892312750265504548655938497110250316118344
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gerson W. Barbosa  08082012 I fear somehow the third term has been evaluated as 1/10^4, instead of 9/10^4.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Les Koller  08082012 You know, I do believe you are exactly right!
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Les Koller  08082012 OK, if I didn't make another bone headed mistake, the answer to 200 places is
20.000000000000000729511118583827559785599660921569043259840768263504850897172305040683344584755775283821628948893194895388850532202280827489024706316143294490892312750265504548655938497110250316118344, same as a lot of the others through 20 or so digits after the decimal point. Thanks Gerson.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Bart (UK)  08092012
Quote:I get 20. RPN style: 10 SQRT : 3.16227766 Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Bart (UK)  08092012
Quote:
I would expect a 10digit machine to get 23.14069263 for e^pi: 10 digitsThis disagrees slightly with my answer (in anoher post) as I choose to do it in a different order. More digits to the last result here would be: 19.99999999081052496 More digits to the last result of my other post would be: 19.999999997 So this once again highlights the fallacy of claiming a "perfect" result to "n digits". Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gilles Carpentier  08092012 I understand ... On my CASIO FX 602P
1 / 3 = * 3 returns _exactly_ 3 wich is not the 'perfect' result ;). The number is not rounding to 1 before display, it's 1 in memory. 1/7*7 > 1 exactly etc... It is 10 digits display (or 9 as a . takes the place of one digit) and 12 digits calculation but there is a rounding process in some calculations (I dont know exactly what it does ) e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 display 20 but is 20.0000000002 (result  20 returns 8E10)
Edited: 9 Aug 2012, 7:03 a.m.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Dieter  08092012 Quote:First of all I hope I does not return 3, maybe exactly 1. ;) And yes, there is something going on in you FX602P. In this case this probably is caused by the fact that it uses 11 digits internally, so that it actually evaluates 0,333 333 333 33 x 3 = 0,999 999 999 99 which then is rounded for the display to a plain 1. What do you get after a final  1 = ? Quote:If after this you get 8E10, the actual result was 20,0 000 000 008 which means the result has 12 (!) digits. Are you really sure? BTW, both for 11 and 12digit precision the perfect result is exactly 20.
Dieter
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Dieter  08092012 Quote:Sure, but that's not what any (reasonable) calculator calculates. ;) The exponential function is not (!) evaluated by raising a tendigit value of e to the xth power. The internal e^x function is different from 2,718281828^x. That's why there is such a special function. It's essentially the same as in virtually all programming languages: there is pow(a,x) or a power operator for powers of two arbitrary arguments, and there is exp(x) for the special case of the exponential function e^x. In this case the constant e does not show up anywhere. So the calculator determines the value of exp(3,141592654) which is 23,14069264227... which here is returned as 23,14069264.
Dieter
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Dieter  08092012 Hi Bart, Quote:As explained in my other post: ...q.e.d.
Dieter
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Gilles Carpentier  08092012 Oups ! Sorry for the mistakes ! yes it is 20,0 000 000 008 Yes i'm sure that the 602P uses 12 digits in memories and X Y registers. I used this in some programs to memorize 12 digits in only one memory (12 memories 0..9 in one) and it works fine...
.123456789 + 123E12 = (Display .123456789) It seems that the 602P has a curious algorithm about rounding the 12th digits. 1(0.333333333+33E11)*3 > 1E11 1(0.333333333+333E12)*3 > 0 (and (1/3)*31 > 0) 1(0.333333333+333E12)0.666666666 > 667E12 1  0.333333333  333E12  0.666666666  666E12 > 1E12 But 0.333333333 + 333E12 + 0.666666666 + 666E12  1 > 0
Edited: 9 Aug 2012, 8:38 a.m.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Bart (UK)  08092012 The original formula states e^pi, not exp(pi).
Edited: 9 Aug 2012, 8:36 a.m.
Re: e^pi  pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2  Bart (UK)  08092012 No, see my answer to your post above.
HP200LX Emulator  Mike (Stgt)  08102012 waitwaitwait!! An HP200LX emulator?!? Realy an emulator?? Or the Connectivity Pack, I assume.
Ciao.....Mike
Re: HP200LX Emulator  Peter A. Gebhardt  08122012 Mike, the Connectivity Pack was used. But isn't it an emulator?
Best regards
Re: HP200LX Emulator  Mike (Stgt)  08122012 Well, the Connectivity Pack is compiled from the same sources like the SW running on the real HW. But an emulation would emulate the 200LX HW and would allow the 'switching' of applications. Alas this is not possible in the Connectivity Pack where you have tho close an application before you can start an other one.
Ciao.....Mike
