magicnumbers

← home

0x5F3759DF

Fast inverse square root constant

category
algorithm
normalized
5f3759df
confirmed
2026-05-23
lookups
1
source
https://en.wikipedia.org/wiki/Fast_inverse_square_root

The bit-level constant from Quake III Arena's Q_rsqrt: subtracting (i >> 1) from it gives a remarkably good first guess at 1/sqrt(x). Famously annotated "what the f...?" in the original source.

Similar magic numbers

valuenamecategory
5F 27 A8 89 Jar archive file-signature
5F 43 41 53 45 5F EnCase case file file-signature