[KongchangAI]
Concept浮点数标准 / IEEE浮点标准

IEEE 754

An IEEE standard for binary floating-point arithmetic that defines the representation of floating-point numbers, precision levels (approximately 7 decimal significant digits for fp32 and 15 for fp64), and rounding rules. It serves as the foundational specification for floating-point operations in modern computing.

Timeline (last 90 days)

Oct 17

NaN in the IEEE 754 floating-point standard represents an invalid operation result, with common triggering conditions including 0/0, ∞−∞, ∞×0, and taking the square root of a negative number.

Unverified50%
Oct 14

IEEE 754 double-precision floating-point numbers (TypeScript's number type) cannot precisely represent many decimal fractions, and are therefore unsuitable for financial calculations.

Unverified50%
Oct 14

IEEE 754 double-precision floating point (float64) can only exactly represent fractions whose denominator is a power of 2, and decimal fractions like 0.1 and 0.2 are infinite repeating fractions in binary, so they are necessarily truncated when stored.

Unverified50%
Oct 12

IEEE 754 floating-point numbers cannot precisely represent most decimal fractions, and repeated operations produce rounding errors, for example in JavaScript 0.1 + 0.2 === 0.30000000000000004.

Unverified50%
Oct 12

After converting an unsigned integer n to float, the exponent field of the normalized result equals floor(log2(n)) + 127.

Unverified50%
Oct 12

In the floating-point exponent extraction method, a zero-value input produces -∞ (all-zero exponent), which requires additional handling.

Unverified50%
Oct 12

For 32-bit integers exceeding 2²⁴, the mantissa precision of single-precision floating-point is insufficient to represent the value exactly, causing the exponent field to be underestimated.

Unverified50%
Oct 12

Single-precision floating-point numbers store the exponent in 8 bits using biased encoding with bias = 127.

Unverified50%
Oct 12

Floating-point addition does not satisfy the associative law; (a+b)+c and a+(b+c) may differ by one unit in the last place.

Unverified50%
Oct 11

Floating-point addition and multiplication are not associative under the IEEE 754 standard, and the different internal summation orders of GEMM and GEMV produce extremely small differences in activation values for the same input.

Unverified50%

8 more timeline events

All Facts (19)

Unverified

Python的浮点数遵循IEEE 754双精度浮点数标准,使用64位二进制来表示一个小数

60%
Unverified

NaN in the IEEE 754 floating-point standard represents an invalid operation result, with common triggering conditions including 0/0, ∞−∞, ∞×0, and taking the square root of a negative number.

50%
Unverified

IEEE 754 double-precision floating-point numbers (TypeScript's number type) cannot precisely represent many decimal fractions, and are therefore unsuitable for financial calculations.

50%
Unverified

IEEE 754 double-precision floating point (float64) can only exactly represent fractions whose denominator is a power of 2, and decimal fractions like 0.1 and 0.2 are infinite repeating fractions in binary, so they are necessarily truncated when stored.

50%
Unverified

IEEE 754 floating-point numbers cannot precisely represent most decimal fractions, and repeated operations produce rounding errors, for example in JavaScript 0.1 + 0.2 === 0.30000000000000004.

50%
Unverified

In the floating-point exponent extraction method, a zero-value input produces -∞ (all-zero exponent), which requires additional handling.

50%
Unverified

Single-precision floating-point numbers store the exponent in 8 bits using biased encoding with bias = 127.

50%
Unverified

After converting an unsigned integer n to float, the exponent field of the normalized result equals floor(log2(n)) + 127.

50%
Unverified

For 32-bit integers exceeding 2²⁴, the mantissa precision of single-precision floating-point is insufficient to represent the value exactly, causing the exponent field to be underestimated.

50%
Unverified

Floating-point addition does not satisfy the associative law; (a+b)+c and a+(b+c) may differ by one unit in the last place.

50%
Unverified

Floating-point addition and multiplication are not associative under the IEEE 754 standard, and the different internal summation orders of GEMM and GEMV produce extremely small differences in activation values for the same input.

50%
Unverified

JavaScript's native Date object is essentially an IEEE 754 double-precision floating-point number representing milliseconds since the Unix epoch, directly depending on the underlying operating system clock.

50%
Unverified

JavaScript's native number type is an IEEE 754 double-precision float whose 53-bit mantissa loses precision when representing nanosecond-level timestamps (on the order of approximately 1.7×10¹⁸), which is the fundamental reason for recommending BigInt instead.

50%
Unverified

The SSE2 instruction set was introduced in 2001 with the Pentium 4, bringing IEEE 754-compliant 32/64-bit floating-point operations.

50%
Unverified

FP32 uses 32 bits to represent floating-point numbers, consisting of 1 sign bit, 8 exponent bits, and 23 mantissa bits.

50%
Unverified

According to IEEE 754's round-to-nearest-even rounding rule, adding a number less than half a ULP (approximately 0.00000006) to 1.0 still results in 1.0, making the addition ineffective.

50%
Unverified

Hexel Editor provides instant decoding of the byte at the cursor position, displaying how the data is interpreted under different data types (8/16/32/64-bit integers, IEEE 754 floating-point numbers, ASCII/UTF-8 character encoding, etc.).

50%
Unverified

The actual result of the floating-point operation 0.1 + 0.2 is 0.30000000000000004, not the exact value 0.3.

50%
Unverified

Due to IEEE 754 floating-point precision limitations, directly using EXPECT_EQ for floating-point comparisons will almost certainly lead to false failures, and EXPECT_NEAR should be used to specify a tolerance.

50%

Source Articles