This page states Euler's identity, explains why e^{iπ} = -1 in mathematical English, illustrates it on the unit circle, and verifies it numerically with a small test harness.
The complex exponential e^{iθ} traces the unit circle. At θ=π the point is −1, so e^{iπ}+1=0.
We evaluate at θ = π + 2πk. N is the number of terms used in the power‑series expansions for cos and sin; higher N gives a tighter approximation (30–50 is typically plenty after angle reduction to [−π,π]). The tolerance ε is used by the numerical checks.
Each block declares its expected outcome. A PASS means the result matched that expectation—including when a noncongruent angle was correctly rejected. Integer periods are reduced symbolically before numerical evaluation.