1
$\begingroup$

I'm writing some code, and I'm trying to succintly explain that $0.1$ has infinitely many repeating decimals in base 2 ($0.0\overline{0011}_2$).

How can I succintly explain this to a programmer, in a source code comment, without using $\LaTeX$ or too advanced UTF-8 symbols? Does it have a name?

  • 0
    non-terminating.2017-01-03
  • 0
    *This only answers your second question; however, the following link may be of use.* It's called a [repeating decimal](https://en.wikipedia.org/wiki/Repeating_decimal). (Who knew! `:)`) Even though you're using base 2, I suppose the decimal is for "decimal point".2017-01-03

2 Answers 2

3

I would say "$0.1$ is non-terminating in base $2$". "A repeating decimal" would also be an appropriate phrase to use in place of "non-terminating".

If you're trying to demonstrate that it's non-terminating, I can't suggest anything better than just saying "$0.1$ is '$0.000110011\ldots$' in base $2$". I'd recommend not trying to explain any further in comments; if they don't understand what "non-terminating" means, they can look it up.

1

In your example, you would say that $0.1_{10}$ is not a binary fraction, meaning that it cannot be expressed as a fraction with a denominator that is a power of $2$.

For example, $0.75_{10}$ can be expressed as $\frac{3}{2^2}$, so it is a binary fraction.

This terminology can be easily extended to other numbering systems (i.e. "decimal fraction", "octal fraction", or "hexadecimal fraction")