2D Astronomical Simulation

You’ll need to use something with much more precision than a float, perhaps a double

A float only has about 6 to maybe as much as 9 digits of precision.

It has a lot of dynamic range, but not precision.

Similarly you’ll almost certainly need to implement some type of floating origin (google it up) as a final step for marshaling data to any GameObjects you use, as those must be driven by Transforms which are all driven off float-based datatypes.

Some more reading:

“Think of [floating point] as JPEG of numbers.” - orionsyndrome on the Unity3D Forums

Floating (float) point imprecision:

Never test floating point (float) quantities for equality / inequality. Here’s why:

https://starmanta.gitbooks.io/unitytipsredux/content/floating-point.html