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 4: | Line 4: | ||
| title = e to the pi Minus pi | | title = e to the pi Minus pi | ||
| image = e_to_the_pi_minus_pi.png | | image = e_to_the_pi_minus_pi.png | ||
+ | | imagesize = | ||
| titletext = Also, I hear the 4th root of (9^2 + 19^2/22) is pi. | | titletext = Also, I hear the 4th root of (9^2 + 19^2/22) is pi. | ||
}} | }} | ||
==Explanation== | ==Explanation== | ||
− | + | "e" is a mathematical constant that is about equal to 2.71828182846. π is about equal to 3.14159265359. | |
− | + | Computers use "floating point" numbers to store decimals. As noted in the comic, e^π - π is 19.999099979. However, Hat Guy's teammates' algorithms truncate to 3 decimal digits — giving a result of 19.999. Yet the programmers thought that 19.999 should come out to 20 unless they had errors in their algorithms (they did not; 19.999 would be the correct result). | |
+ | ACM is the Association for Computing Machinery; it sponsors the International Collegiate Programming Contest. | ||
− | + | :In the title text, another mathematical coincidence is presented. The 4th root of (9^2 + 19^2/22) is 3.1415926525, which is extremely close to pi (≈3.1415926535). | |
− | |||
− | |||
− | |||
− | The | ||
− | |||
− | |||
==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}} | |
− | + | <!-- Include any categories below this line--> | |
− | |||
− | |||
− | |||
[[Category:Comics featuring Cueball]] | [[Category:Comics featuring Cueball]] | ||
[[Category:Comics featuring Black Hat]] | [[Category:Comics featuring Black Hat]] | ||
[[Category:Math]] | [[Category:Math]] | ||
− |