About floating point precision and why do we still use it
Posted
by
system_is_b0rken
on Game Development
See other posts from Game Development
or by system_is_b0rken
Published on 2010-08-30T07:54:38Z
Indexed on
2014/06/07
3:50 UTC
Read the original article
Hit count: 272
Floating point has always been troublesome for precision on large worlds.
This article explains behind-the-scenes and offers the obvious alternative - fixed point numbers. Some facts are really impressive, like:
"Well 64 bits of precision gets you to the furthest distance of Pluto from the Sun (7.4 billion km) with sub-micrometer precision. "
Well sub-micrometer precision is more than any fps needs (for positions and even velocities), and it would enable you to build really big worlds.
My question is, why do we still use floating point if fixed point has such advantages? Most rendering APIs and physics libraries use floating point (and suffer it's disadvantages, so developers need to get around them).
Are they so much slower?
Additionally, how do you think scalable planetary engines like outerra or infinity handle the large scale? Do they use fixed point for positions or do they have some space dividing algorithm?
© Game Development or respective owner