Conversion of recurring decimal to fraction