Any thoughts on a version (or a library) of numbers (rationals, bignums, ...) where this does not happen?
You want a library for that? There is one, currently called "Bignums, rationals, complex #s".
Edit: But that exact case isn't fixed by bignums. You'll have to do something like this:
Thank you!