sohailmbaprep wrote:
-> Also want to know, what is the way to find out if any r/s is terminating decimal or not, in general.
If r and s are nonzero integers, you can tell if any fraction r/s will produce a terminating decimal by doing the following:
1. reduce your fraction
2. prime factorize the denominator s
3. if s has a prime factor different from 2 or 5, r/s will give you a non-terminating (repeating) decimal. If the only prime factors of s are 2, 5 or both 2 and 5, then r/s will produce a terminating decimal expansion.
It can be useful to understand why this works, because it can allow you to calculate some terminating decimals quickly (and two questions in OG13 test if you understand how this works). If you take a fraction like 11/125, this fraction is reduced, and if we prime factorize the denominator, we find it is equal to 5^3. Since 5 is the only prime divisor of the denominator, 11/125 should produce a terminating decimal expansion. We can find that decimal very easily. If we can write a fraction with 10, or 100, or 1000, or some power of 10 in the denominator, it is very easy to convert it to a decimal. If we have 5^3 in our denominator, multiplying by 2^3 will give us 10^3 = 1000 in our denominator:
11/125 = 11/5^3 = (2^3 * 11) / (2^3 * 5^3) = 88/1000 = 0.088
And that's why the above works in general; if your only prime divisors in your denominator are 2, 5 or both, it is always possible to multiply the denominator by something to get a power of 10 in your denominator, and if you can get a power of 10 in your denominator, your fraction clearly will have a terminating decimal expansion.