Almost Equal

JSON →
library 1.1.0 ·javascript maintenance
verified May 27, 2026

The `almost-equal` package provides a robust utility for comparing two floating-point numbers (`a` and `b`) with configurable absolute and relative tolerances. It addresses the inherent precision issues in floating-point arithmetic by not relying on direct equality (`a === b`). The current stable version is 1.1.0, released in 2013, indicating a very mature and stable codebase with a minimal release cadence, primarily focusing on its original purpose without frequent updates. It differentiates itself by offering both `FLT_EPSILON` (32-bit) and `DBL_EPSILON` (64-bit) constants and a clear formula `|a - b| < max(absoluteTolerance, min(|a|, |b|) * relativeTolerance)` for precise control over the comparison logic, making it suitable for scientific and financial applications where exact float comparison is critical but direct equality checks are unreliable.

total hits 33
actors 10 distinct systems
last hit 22h ago human
ByteDance
5
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2
Humans
6

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · BD