Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Series
Computer Science Fundamentals
PART 04
How Floating Point Works: IEEE 754, 0.1 + 0.2, NaN and double vs decimal
0.1 + 0.2 isn't 0.3 because a double stores numbers in base 2 with a sign, an exponent and a 52-bit mantissa, and 0.1 can't be written exactly in that base. The binary64 bit layout, gaps that widen as numbers grow, ±0, NaN and subnormals, comparing with relative tolerance, Half/float/double/decimal, the saturating conversions of .NET 9 and .NET 11, banker's rounding and culture-dependent parsing.
14 Nov 2026
13 min
5
Backend
PART 04
Numbers and Arithmetic in C#: int, double, decimal and Overflow
Integer division and the remainder in C#, choosing between int, long, double and decimal, why 0.1 + 0.2 isn't 0.3, decimal for money, overflow and checked, dividing by zero, the Math class and the banker's rounding trap.
7 Nov 2026
8 min
35