So true. For my application I convert a rational to a float whenever:
abs(Numerator)+(Denominator) > max_tagged_integer
but this is a fairly conservative limit and may, in general, not be the best. It’s also important that the rounding direction be specifiable when precision is lost since I’m using a pair of numeric values as closed bounds.
Not sure what a general solution would look like, but this may be useful as a starting point.
I’m happy to do some testing if you can point me at an executable I can run on my Mac (terminal mode acceptable).