We need to convert a calculated value which might be something like 3.33333000540733337 to 3 1/3. Any of the libraries I've tried such as https://github.com/peterolson/BigRational.js will convert that to the most accurate rational number whereas I'm only concerned with the approximate rational number, to .01 significant decimals.
In ruby we currently do Rational(1.333).rationalize(Rational(0.01)) which gives us 1 as whole number, 1 as numerator and 3 as denominator.
Any thoughts on an algorithm that might help would be great.