xutil.dev
Login

Floating Point Error Checker

Analyze floating-point precision errors online — see why 0.1 + 0.2 ≠ 0.3 in IEEE 754. Shows expected vs actual results with bit-level representation — free developer tool

Input
Common examples:
0.1 + 0.20.3 - 0.10.1 * 0.21.0 - 0.90.1 + 0.71e20 + 1 - 1e20
Computation Result
Expression:0.1 + 0.2Expected:0.3Actual result:0.30000000000000004441Absolute error:5.551115e-17Relative error:1.8504e-14%
IEEE 754 Representation (64-bit double)
Actual result: 0.30000000000000004
0
0
1
1
1
1
1
1
1
1
0
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
0
SignExponent (11-bit)Mantissa (52-bit)
Expected: 0.3
0
0
1
1
1
1
1
1
1
1
0
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
Why Does This Error Occur?

Computers represent numbers using IEEE 754 binary floating-point format. Values like 0.1 or 0.2 in decimal become infinitely repeating fractions in binary and cannot be represented exactly with finite bits. This is analogous to how 1/3 cannot be represented exactly in decimal. As a result, small rounding errors can accumulate during computation.