float_to_fraction: Converting a decimal to a fraction
Description
Converts a decimal to a fraction based on the algorithm
from http://stackoverflow.com/a/5128558/221955.
Usage
float_to_fraction(x, tol = 1e-06)
Arguments
- x
The fraction in decimal form.
- tol
The tolerance level for the conversion error.