Tag

toFixed

1 views collected around this technical thread.

Beike Product & Technology
Beike Product & Technology
Oct 14, 2020 · Fundamentals

Understanding IEEE‑754 Floating‑Point Precision Issues in JavaScript

This article explains why JavaScript’s Number type, which follows the IEEE‑754 double‑precision standard, can produce unexpected results such as 0.1 + 0.2 = 0.30000000000000004, demonstrates the binary representation of numbers like 2.5 and 0.1, and offers practical techniques and libraries to mitigate floating‑point errors.

JavaScriptbig-numberfloating-point
0 likes · 8 min read
Understanding IEEE‑754 Floating‑Point Precision Issues in JavaScript