% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{float_to_fraction}
\alias{float_to_fraction}
\title{Converting a decimal to a fraction}
\usage{
float_to_fraction(x, tol = 1e-06)
}
\arguments{
\item{x}{The fraction in decimal form.}

\item{tol}{The tolerance level for the conversion error.}
}
\description{
Converts a decimal to a fraction based on the algorithm
from http://stackoverflow.com/a/5128558/221955.
}
\examples{

float_to_fraction(5/3)

}
\author{
Kaifeng Lu, \email{kaifenglu@gmail.com}
}
