3 ms·
> precision has a 53-bit mantissa (~16 decimal digits), that means if you need only 8 or fewer decimal digits, you're completely fine with double precision pha
by ClumsyPilot 3y ago
> precision has a 53-bit mantissa (~16 decimal digits), that means if you need only 8 or fewer decimal digits, you're completely fine with double precision
phave you ever played Kerbal Soace Program? have you met the Kraken?
the game simulates a spacecraft you build piece by piece. So you are flying around in space and a thruster fires and maybe some part of the ship is poorly attached and it wobbling. Everything is fine, but then you clip upper atmosphere of mars, and everything goes to shit - tleven though it shoupd pose no threat, the spacecraft spontaneously shakes itself to pieces
That game is plagued by massove problems with floating point errors , they kill you vrew, they ruin your missions, your speed of rotation becomea a NAN
- imtringued 3y agoOpenSpace uses 32 bit floating point numbers and can scale from planck length to the whole diameter of the observable universe with practically no loss of precision. The problem with this approach is that KSP would need to rewrite the entire rendering engine and physics engine from scratch to support infinite precision.
- crote 3y agoKSP's Kraken pretty much proves their point, no? Simulating human-scale physics in a solar-system-scale world needs far more than 8 decimal digits. Neptune's orbit is 12 orders of magnitude larger than your spacecraft, no wonder your floats are acting up. You're going to need at least 50-bit precision to make your simulations accurate to the millimeter. If anything, the fact that KSP is pretty much the only game with serious float issues shows that doubles are just fine for most applications.