5 ms·
I imagine that you'd want to use fixed-point arithmetic when it comes to these things, right? Floating-point numbers are good enough for a lot of things, but th
by snet0 2y ago
I imagine that you'd want to use fixed-point arithmetic when it comes to these things, right? Floating-point numbers are good enough for a lot of things, but the precise thing they're bad at is dealing in high precision at multiple orders of magnitude, which feels like a thing NASA would kinda need.
- mr_mitm 2y agoA lot of the parameters that enter their equations are probably measurements, like the gravitational acceleration, properties of some material, and so on. The numerical solutions to their equations have an error that is at least that of the most unprecise parameter, which I can't imagine to be more than four significant digits, so doubles should provide plenty of precision. The error introduced by the numerical algorithms can be controlled. I don't see why you'd need fixed point arithmetic.
- snet0 2y agoOkay yeah, what you're saying seems true. I guess the GP comment was discussing that, with this new measurement of pi, we now have enough precision (in pi) to reference a point this small on an object this far away. Once you account for all the other uncertainties in referencing that point, as you mentioned, all that precision in one dimension of the measurement is completely meaningless. It still feels weird that you'd use an arithmetic with guaranteed imprecision in a field like this, but I can definitely see that, as long as you constrain the scales, it's more than enough.
- lanstin 2y agoThey put in scheduled fix the course burns, as there's a lot of uncertainty outside the math - the fuel burns probably can't be controlled to 5 sig figs, for example. Also, although I have no idea if this matters, N-body orbital mechanics itself is a chaotic system, and there will be times when the math just won't tell you the answer. https://botsin.space/@ThreeBodyBot https://botsin.space/@ThreeBodyBot if you like to see a lot of examples of 3-body orbits. (maybe just in 2d, I'm not sure).
- fwip 2y agoFixed-point also has guaranteed imprecision for many operations, because you only have a finite number of digits after the decimal point. e.g, with two decimal digits: (2.83 * 0.10) = 0.283, which is stored as 0.28.
- constantcrying 2y ago>but the precise thing they're bad at is dealing in high precision at multiple orders of magnitude, which feels like a thing NASA would kinda need. The precise thing they are good at is dealing with number in a wide range of magnitudes. Where as fixed point numbers can not be used if the magnitudes vary wildly. You can only use fixed point arithmetic if you know that every intermediate calculation you make will take place in a specific range of precision. E.g. your base precision might be millimeters, so a 32 bit fixed point number is exact up to one millimeter, but can at maximum contain a distance of 2^32-1 millimeters, so around 4.3 billion millimeters. But again you have to keep in mind that this is the maximum value for every intermediate result. E.g. when calculating the distance between two point in 3D space you need a power of 3, so every value you calculate the power of needs to have a value of less than the third root of 4.3 billion. This makes fixed point arithmetic very hard to correctly implement and requires a very deep analysis of the system, to make sure that that the arithmetic is correct.
- IshKebab 2y agoProbably not - 64 bit float pretty much has enough bits that it wouldn't be an issue even on the scale of the solar system. Even if it was it would be easier just to switch to 128 bit float than deal with fixed point.
- constantcrying 2y agoFor two operations the floating point error is unbounded. If it ever made sense to carefully analyze a fixed point system it is for manned space flight.
- pclmulqdq 2y agoThat isn't exactly true. Floating point error is only really unbounded if you hit a cancellation (ie subtracting two big numbers), which you can avoid by doing some algebra.
- constantcrying 2y agoThat is totally wrong. You can not in general avoid cancellation, even claiming that is ridiculous. WTF are you even saying.
- fwip 2y agoWhy not?
- constantcrying 2y agoBecause if your algorithm contains an "-" and you don't have complete control over the inputs to both sides of that minus, you will have cancellation. There is no general way to mitigate that, you can use numerically superior algorithms or screen your inputs, but these only help in specific cases. There is no general way to avoid this, every algorithm needs to be treated specifically.