Converts decimal approximations to fractions.