Find rational approximation to given real number (ruby c extension). Float to Rational