Converting lengths to fractions