217: e to the pi Minus pi
e to the pi Minus pi |
Title text: Also, I hear the 4th root of (9^2 + 19^2/22) is pi. |
[edit] Explanation
e is a mathematical constant roughly equal to 2.71828182846. π is another, roughly equal to 3.14159265359. Both are transcendental numbers.
The first panel discusses e^{π} - π, which is around 19.999099979 — very close to 20. Black Hat explains how he tricked a programming team into believing that e^{π} - π is exactly 20, and that if the system they were building didn't agree, there were errors in the code. This made them waste a lot of time trying to find a nonexistent bug until they realized that Black Hat was lying.
Floating point numbers are how computers store real numbers — or rather, approximate them: a true real number requires infinite amounts of data to represent. The "floating-point handlers" would be the code performing the e^{π} - π calculation.
ACM is the Association for Computing Machinery, sponsoring the International Collegiate Programming Contest.
Some random facts about the math here:
- e^{π} - π is an irrational number, but this is not a trivial fact. It was proven by Yuri Valentinovich Nesterenko in the late 20th century.
- The mysterious almost-equation is believed to be a mathematical coincidence, or a numerical relationship that "just happens" with no satisfactory explanation. It can be rearranged to (π + 20)^{i} ≈ -i, so cos(ln(π + 20)) ≈ -1. Piling on a few more cosines gives cos(π cos(π cos(ln(π + 20)))) ≈ -1, which is off by less than 10^{−35}!
The title text pokes fun at another coincidence: ∜(9² + 19²/22) ≈ 3.1415926525, close to π. The humor comes from the fact that π is meant to be transcendental. Transcendental numbers are numbers that cannot be expressed through basic arithmetic with integers; one cannot end up with the exact value for any transcendental number (including π) by adding, subtracting, multiplying, dividing, exponentiating and/or taking the nth root of any whole number, meaning the title text cannot possibly be true.
A much later comic, 1047: Approximations, puts forth quite a few more mathematical coincidences.
[edit] Transcript
- 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.
- Cueball: ...what?
- 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.
- Black Hat: Yeah, they dug through half their algorithms looking for the bug before they figured it out.
Discussion
Asserting that the programmers' algorithms truncated to three decimal digits is an unsupported and unnecessary extrapolation. Most floating-point implementations use binary, not decimal, and 19.999099979 looks very much like a rounding error in binary floating-point that has accumulated over several operations. Daddy (talk) 12:39, 29 April 2013 (UTC)
The third bullet-point above needs changing... (9^2+(19^2/22))=97.4090909091 which is close to pi to the fourth power, so it should be (as noted in the text) (9^2+(19^2/22))^1/4 Squirreltape (talk) 19:27, 25 February 2014 (UTC)
- Actually, in-case you didn't notice, it says "∜(9² + 19²/22)", not just the sum on its own. I checked the sum on my calculator, and it is equal to what the page is saying. "∜(9² + 19²/22)" means "4th root of (9^2+19^2/22)" (What the title text is saying), or on Windows Calculator, "(9^2+19^2/22) yroot(4)" (Basically what the sum is saying). So, the 3rd bullet point is correct. --Katavschi (talk) 22:48, 23 April 2014 (UTC)