The current behaviour of shrink for fractional / floating numbers is not particularly useful: it only tries replacing the number with integers, but that often leads to quite different behaviour of numerical functions.
I've implemented an algorithm based on continued fractions, which generates an asymptotic sequence that actually approximates the original number, and also behaves more sensibly for infinities etc..
The current behaviour of
shrink
for fractional / floating numbers is not particularly useful: it only tries replacing the number with integers, but that often leads to quite different behaviour of numerical functions.I've implemented an algorithm based on continued fractions, which generates an asymptotic sequence that actually approximates the original number, and also behaves more sensibly for infinities etc..
Examples:
Compare this to the old behaviour: