Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

signed zero

Floats have both +0 and -0; they compare equal, but some results (like 1 / -0) tell them apart.

IEEE 754 encodes +0 and -0 with exponent and fraction all zeros and differing sign bits; they compare equal, yet division by them, copysign and some library functions distinguish them.

Examples

  • -0.0f is 0x80000000. It compares equal to 0.0f, but 1 / −0.0 is −∞.

Read the full section →