login
Holden Web
What you'll need to know tomorrow

Close Enough?

I have long admired the formula often known as Euler's identity. It was probably known before Euler's time, but it is associated inextricably with his name because it is a special case of a more general formula, with π as the value of the bound variable. The identity asserts that


To me this is a thing of beauty and a joy forever, but I have long since given up trying to explain to other people why or how I perceive beauty in mathematics. Anyway I thought I would see how close my trusty laptop could get to emulating this mystic identity (it's amazing what I get up to when procrastinating), and naturally chose Python (though I believe the results would be just as disappointing in any other language). Here's what I got:

>>> math.e**(math.pi*-1j)
(-1-1.2246467991473532e-16j)


Definitely not quite the same mystical properties there, even though numerically quite close. No wonder I never liked applied mathematics!