DigiNews

Tech Watch by Johan Denoyer

← Back to articles

It's NOT OK to compare floating-points using epsilons

Quality: 8/10 Relevance: 7/10

Summary

An in-depth critique of using epsilon-based comparisons for floating-point numbers, arguing that epsilons are often hacky and error-prone. The article walks through case studies (grid-based movement, SLERP, vector length, convex hull, ray-box intersection, and input sanitization) to show why robust alternatives are usually preferable, and discusses when epsilons might be acceptable.

🚀 Service construit par Johan Denoyer