On Sat, May 15, 2021 at 1:16 AM Michael Smith
Jonathan Fine said
But here there is a cost. Arbitrary precision arithmetic (and roots) uses more memory and takes longer.
I think a wider (perhaps naive) interpretation of the idea could be, "can we defer certain lossy calculations until they have to be done?"
Fraction may do eager arbitrary precision arithmetic (I don't know), but is it necessarily the case that integer division has to be eager? Could we have our cake and eat it, too?
Well, integer division has to return *something*, there has to be a value for it. So the only benefit you might get would be that 10/8 could be stored as the fraction 10/8 instead of reducing it to 5/4, which would save some effort at the time of division at the cost of worsening addition. ChrisA