Verify a trigonometric identity numerically by sampling angles and reporting max deviation.
Rather than attempting a symbolic proof, this checker evaluates both sides of a trigonometric identity at 100 sample angles and reports the maximum numerical deviation. A deviation under 1×10⁻¹⁰ means the identity holds to floating-point precision.
Pythagorean Identity
sin²θ + cos²θ = 1
Double Angle (sine)
sin(2θ) = 2·sin θ·cos θ
No — it is strong evidence but not a formal proof. However, for standard identities the deviation should be at floating-point error levels (< 10⁻¹⁴). A non-identity will show large deviation.
Using a non-round step avoids accidentally hitting only special angles where an identity might coincidentally hold but fail elsewhere.