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/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: e^pi - pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 (/thread-228637.html) |
e^pi - pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 - Gerson W. Barbosa - 08-06-2012 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 W|A:
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 epi - 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 - 08-06-2012 Well, for the posted expression, I got 20-(10^-8) on my HP-25C.
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 - 08-06-2012 Hello Matt,
The correct 10, 12 or even 16-digit result would be 20, but one-digit 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 - 08-06-2012 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 - 08-06-2012 20.00000001 (15C, 41CV)
Paulo
Re: e^pi - pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 - Peter A. Gebhardt - 08-06-2012 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 - 08-06-2012 19,99999999999999, both on the emulator and on the real HP-200LX 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) - 08-07-2012
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 - 08-07-2012 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 - 08-07-2012 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) - 08-07-2012 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 - 08-07-2012
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 - 08-07-2012 TI-57: 20, exactly. Rather than closeness to the actual result, I would like to call the attention to near integers, however. Almost Integer, or Near-Integer, is an interesting topic in Recreational Mathematics. Another example:
2*(e - atan(e)) = 2.9999979 (sticking to the TI-57, for a change :-)
Re: e^pi - pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 - Bunuel66 - 08-07-2012 20 on HP 39 GII ;-)
Re: e^pi - pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 - Paul Dale - 08-07-2012 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 - 08-07-2012 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 - 08-07-2012 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 - 08-07-2012
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*PI-3240000000)*LN(2)^2+(120000000*sqrt(10)*PI-108000*sqrt(10))*LN(2)+(10000*PI-36009)))/(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) - 08-07-2012 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 - 08-07-2012 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 - 08-07-2012 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 - 08-08-2012 20 on TI 36X Pro
Re: e^pi - pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 - Dieter - 08-08-2012 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 n-digit machine, and this result is not neccessarily 20. But I think you will know this. :-) As far as I know, the TI-57 displays 8 digits, but internally it works with 10 digit precision. For a 10-digit machine, the perfect result is 20.00000001. So if the TI-57 returns exactly 20, it simply is 1 ULP off. BTW the perfect 8-digit 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 1E-8? Just curious, ;-)
Dieter
Re: e^pi - pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 - Gilles Carpentier - 08-08-2012
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 - 08-08-2012 Quote: Yes, I am aware of that. I still remember one of Roger Rosenbaum's lessons on this topic :-) http://www.hpmuseum.org/cgi-sys/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 11-digit 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 - 08-08-2012 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/cgi-sys/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 - 08-08-2012 If the TI-57 actually uses 11 internal digits the result is fine: Both for 11- and 12-digit 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 - 08-08-2012 Gilles, the "perfect result" is the one you get from a perfect calculator. Let's suppose you got a 10-digit 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 real-world 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, error-free calculator) of this well-known "Forensic test" is not 9, but 9,000417403 for 10-digit 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 - 08-08-2012 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 - 08-08-2012 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 - 08-08-2012 Google calculator gives 20 exactly.
Re: e^pi - pi + 9/10^4 + 1/(10^4*ln(2) + sqrt(10)/6)^2 - Gerson W. Barbosa - 08-08-2012 Quote:
TI-57 Whenever the TI-57 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 - 08-08-2012 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 - 08-08-2012 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 - 08-08-2012 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 - 08-08-2012 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) - 08-09-2012
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) - 08-09-2012
Quote:
I would expect a 10-digit 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 - 08-09-2012 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 8E-10)
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 - 08-09-2012 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 8E-10, 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 12-digit 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 - 08-09-2012 Quote:Sure, but that's not what any (reasonable) calculator calculates. ;-) The exponential function is not (!) evaluated by raising a ten-digit value of e to the x-th 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 - 08-09-2012 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 - 08-09-2012 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 + 123E-12 = (Display .123456789) It seems that the 602P has a curious algorithm about rounding the 12th digits. 1-(0.333333333+33E-11)*3 -> 1E-11 1-(0.333333333+333E-12)*3 -> 0 (and (1/3)*3-1 -> 0) 1-(0.333333333+333E-12)-0.666666666 -> 667E-12 1 - 0.333333333 - 333E-12 - 0.666666666 - 666E-12 -> 1E-12 But 0.333333333 + 333E-12 + 0.666666666 + 666E-12 - 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) - 08-09-2012 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) - 08-09-2012 No, see my answer to your post above.
HP200LX Emulator - Mike (Stgt) - 08-10-2012 wait-wait-wait!! An HP200LX emulator?!? Realy an emulator?? Or the Connectivity Pack, I assume.
Ciao.....Mike
Re: HP200LX Emulator - Peter A. Gebhardt - 08-12-2012 Mike, the Connectivity Pack was used. But isn't it an emulator?
Best regards
Re: HP200LX Emulator - Mike (Stgt) - 08-12-2012 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
|