Editing 217: e to the pi Minus pi
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
==Explanation== | ==Explanation== | ||
− | |||
− | + | ''e'' is a mathematical constant that is an {{w|irrational number}} roughly equal to 2.71828182846. ''π'' is another irrational number roughly equal to 3.14159265359. An important feature of irrational numbers is that their decimal forms neither terminate nor repeat. | |
− | {{w|Floating point}} numbers | + | But computers use {{w|Floating point|floating point}} numbers to store decimals, and with only a finite amount of data for a given number, they can never represent ''e'', ''π'', or ''e''<sup>''π''</sup> - ''π'' exactly. (It is nontrivial that ''e''<sup>''π''</sup> - ''π'' is irrational. It was proven by {{w|Yuri Valentinovich Nesterenko}} in the late 20th century.) As noted in the comic, ''e''<sup>''π''</sup> - ''π'' is about 19.999099979. However, [[Black Hat]]'s teammates didn't know enough about mathematics and let Black Hat trick them into believing that ''e''<sup>''π''</sup> - ''π'' = 20, exactly. Therefore they thought their algorithm had a slight programming error. |
− | ACM is the {{w|Association for Computing Machinery}} | + | ACM is the {{w|Association for Computing Machinery}} sponsoring the {{w|ACM International Collegiate Programming Contest|International Collegiate Programming Contest}}. |
− | + | In the title text, another {{w|mathematical coincidence}} is presented. The 4th root of (9^2 + 19^2/22) is 3.1415926525, which is extremely close to ''π'' (≈3.1415926535). A much later comic, [[1047: Approximations]], puts forth quite a few more mathematical coincidences. | |
− | |||
− | A much later comic, [[1047: Approximations]], puts forth quite a few more mathematical coincidences. | ||
==Transcript== | ==Transcript== | ||
− | :Cueball: Hey, check it out: e | + | :Cueball: Hey, check it out: e^pi-pi is 19.999099979. That's weird. |
:Black Hat: Yeah. That's how I got kicked out of the ACM in college. | :Black Hat: Yeah. That's how I got kicked out of the ACM in college. | ||
:Cueball: ...what? | :Cueball: ...what? | ||
− | :Black Hat: During a competition, I told the programmers on our team that e | + | :Black Hat: During a competition, I told the programmers on our team that e^pi-pi was a standard test of floating-point handlers--it would come out to 20 unless they had rounding errors. |
:Cueball: That's awful. | :Cueball: That's awful. | ||
:Black Hat: Yeah, they dug through half their algorithms looking for the bug before they figured it out. | :Black Hat: Yeah, they dug through half their algorithms looking for the bug before they figured it out. | ||
− | |||
− | |||
− | |||
− | |||
{{comic discussion}} | {{comic discussion}} |