You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this library to losslessly model orbits in an n-body simulator, and I've noticed that after just a few iterations, the length of the data field seems to be growing quite rapidly; quadratically or exponentially is my guess. It would be useful to be able to do something like:
letmut n = Ratio::from_float(1.0).unwrap();
n.max_precision(20);// maximum number of digits in either numerator or denominator is now 20, lossy approximations afterwards
I think it would be difficult to carry around a precision and maintain that throughout internal computation -- but it might not be so bad to offer some kind of "approximation" method to do this manually.
I'm using this library to losslessly model orbits in an n-body simulator, and I've noticed that after just a few iterations, the length of the data field seems to be growing quite rapidly; quadratically or exponentially is my guess. It would be useful to be able to do something like:
You could implement this using Farey fractions, see here: https://math.stackexchange.com/questions/2438510/can-i-find-the-closest-rational-to-any-given-real-if-i-assume-that-the-denomina
I may also just be unfamiliar with the API and don't see where this option exists
The text was updated successfully, but these errors were encountered: