Tag

IEEE 754

1 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
Feb 25, 2025 · Fundamentals

Why Does 0.1 + 0.2 Not Equal 0.3 in Python? Understanding Floating‑Point Precision

Python’s unexpected 0.1 + 0.2 = 0.30000000000000004 result stems from binary floating‑point representation limits defined by the IEEE 754 standard, and the article explains this issue, rounding modes, and practical solutions such as the decimal module, fractions, math.isclose, and high‑precision NumPy types.

Floating PointIEEE 754NumPy
0 likes · 9 min read
Why Does 0.1 + 0.2 Not Equal 0.3 in Python? Understanding Floating‑Point Precision
IT Services Circle
IT Services Circle
Jun 14, 2024 · Fundamentals

Understanding Floating‑Point Precision and Common Pitfalls in Java

The article explains why comparing floating‑point numbers with == in Java often yields unexpected results, describes the IEEE‑754 representation of float and double, demonstrates common pitfalls through code examples, and provides step‑by‑step methods for converting decimal fractions to binary.

Floating PointIEEE 754Java
0 likes · 10 min read
Understanding Floating‑Point Precision and Common Pitfalls in Java