Tag

ieee754

0 views collected around this technical thread.

360 Quality & Efficiency
360 Quality & Efficiency
Sep 1, 2023 · Fundamentals

Understanding Floating-Point Representation, Issues, and Solutions

This article explains how floating‑point numbers are represented in computers using IEEE‑754, illustrates conversion from decimal to binary, describes single‑ and double‑precision formats, outlines common precision, rounding, comparison, overflow, and associativity problems, and presents practical solutions such as high‑precision decimal types, integer scaling, and specialized libraries.

DecimalFloating PointPrecision
0 likes · 9 min read
Understanding Floating-Point Representation, Issues, and Solutions
Top Architect
Top Architect
Jan 23, 2022 · Fundamentals

Understanding Java Float hashCode: Why -0.0 and 0.0 Behave Differently as Map Keys

This article explains how Java's Float hashCode treats 0.0 and -0.0 as distinct values, causing unexpected behavior when using floating‑point numbers as HashMap keys, and shows how to debug, reproduce, and avoid the issue by using alternative representations.

HashCodeHashMapJava
0 likes · 10 min read
Understanding Java Float hashCode: Why -0.0 and 0.0 Behave Differently as Map Keys
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.

Floating PointJavaScriptPrecision
0 likes · 8 min read
Understanding IEEE‑754 Floating‑Point Precision Issues in JavaScript
vivo Internet Technology
vivo Internet Technology
Oct 16, 2019 · Fundamentals

Understanding Floating-Point Precision Issues in JavaScript (0.1+0.2 vs 0.3+0.4)

JavaScript’s unexpected result for 0.1 + 0.2 versus the exact 0.3 + 0.4 arises because numbers are stored in IEEE‑754 double‑precision binary, where limited mantissa bits require exponent alignment and rounding (ties‑to‑even), causing small representation errors that appear as 0.30000000000000004.

Floating PointJavaScriptPrecision
0 likes · 7 min read
Understanding Floating-Point Precision Issues in JavaScript (0.1+0.2 vs 0.3+0.4)