>>What's the best way to store numbers like 2/3, but in situations where you
>>do not want to do any rounding at all. Do you store 2/3 as a string?
>
>If you mean to store general fractions, I agree with Fabio, best thing to do is to store two integers. Maybe add some code to divide both with the largest common divider first. You may even write some code to do basic integer arithmetic with them - adding and multiplication. Depends on what do you want to do with them down the road.
Most code is already written. I would suggest FAQ #23746 for the simplification. (Find the greatest common factor with this FAQ, and divide numerator and denominator by this number.)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)