To do it properly is is quite tricky see Problems with fractions - #3 by monkstone if you are still stuck. Look up ApacheMath implementation.
To do it properly is is quite tricky see Problems with fractions - #3 by monkstone if you are still stuck. Look up ApacheMath implementation.