3 ms·
> Thus having extra precision around -1..1 when solving such problems would be beneficial. Floating point numbers have the same precision (relative precision)
by sampo 4y ago
> Thus having extra precision around -1..1 when solving such problems would be beneficial.
Floating point numbers have the same precision (relative precision) everywhere.
- deleted 4y ago[deleted]
- skellington 4y agoYeah it can be hard to internalize what this means and when it matters, but basically you get about 7 decimal places of precision regardless of the numbers size. So between [-1, 1] you can represent a number like 0.1234567 and then 0.1234568 for a min delta of 0.000001. But around a billion, you can only represent 1,234,567,000 and then 1,234,568,000 for a min delta of 1000. These are not exactly right numbers, just rough estimates to get the idea, but the point is if you are trying to do something like add 1 centimeter to a position that is 10,000 kilometers from an origin, you're adding 0, no matter how many times you do it, it will never increment.
- magicalhippo 4y agoRight, but my point is that you scale the physics problems because it makes them more general. In my example, if you changed the length of the spring you don't have to recalculate the whole solution, you just calculate the new characteristic length for your new spring length and "undo" the scaling with this new characteristic length using the previously computed solution. Thus, since you know a lot of problems will have values around order 1 it makes sense to design the encoding such that you get extra absolute precision for order 1 numbers.