Counting digits after the radix point

For those of you who don't know what a radix point is:

In mathematics and computing, a radix point (or radix character) is the symbol used in numerical representations to separate the integer part of a number (to the left of the radix point) from its fractional part (to the right of the radix point).

I'm developing a program that converts deciman numbers into fractions and reduces them. Currently its limited to 1 and 2 digit numbers after the radix point. Anyone know an algorithm to count how many digits there are after the radix point?