When is a rational number going to have a repeating decimal?

It turns out there’s a really easy way to find out.

For example, given:

``` 3
---
250
```

I can tell you from now (without touching a calculator) that will have a TERMINATING DECIMAL.

Given

```8
-
9
```

I can tell you from now (without touching a calculator) that will have a REPEATING DECIMAL.

How do I know?

All you have to do is factor the denominator into its prime factors.

``` 3         3           3
--- = ----------- = --------
250   (2)(5)(5)(5)  (2)(53)
```

If the denominator of any fraction has the form 2x5y with x, y positive integers, then that fraction represents a terminating decimal value. Otherwise, the fraction represents a repeating decimal value.

Said another way, if you can break down the denominator to being just a bunch of 2’s times a bunch of 5’s, then the fraction represents a repeating decimal.

More examples:

``` 3          3
--- = -------------
900   (22) (32) (52)

1
= --------------
(22) (3) (52)

```

I say the above example will have a repeating decimal because the denominator cannot be totally written as the product of 2’s and 5’s.

Checking with Mr. Calculator, I’m right. 3 / 900 = 0.0033333333 (repeating forever).

Now let us try another example:

``` 9          9
--- = -------------
900   (22) (32) (52)

1
= ---------
(22) (52)

```

So I say this WILL BE a terminating decimal, because the denominator just becomes 2 x 2 x 5 x 5, which is purely the product of 2’s and 5’s.

Indeed, 1/100 = 0.01.

And that’s the way it is.