Is every real in $[0,1]$ a dyadic rational? I'm not a mathematician but I'm interested in dyadyc rationals in $[0,1]$. I know that $x \in [0,1]$ is dyadically rational iif it has a finite binary representation. I wanted to see how that works so I used the following codes: f_d2b, and the code from the accepted answer here.  For the first code all the reals $\in [0,1]$ had a finite representation, so I thought that maybe the code is built to render a finte number of digits. In the second code you can specifie the number of digits you want so I set it to 1000, and I noticed that every real 0:0.0001:0.9999 has a finite representation. I searched and I couldn't find anywhere that confirms that every real $\in [0,1]$ is dyadically rational.
 A: To pound a nail with a nuclear bomb:

Denseness of irrational numbers: Let $a$ and $b$ be any two rational numbers such that $a < b$. Then there exists a real number $c$ such that $a < c < b$ and $c$ is irrational.

Simply put, your answer is very well no.
There does not exist a computer that doesnt conventionally (in normal circumstances) store numbers as anything other than dyadic rationals. So short of a weird "rational" data type storing actual numerical pairs to represent quotients, you will always get a dyadic rational. Next time consider a simple counter-example. $0.1$ is not a dyadic rational. There. You're done and it is the simplest counter-example used when learning about base 2 in computer science courses. I suggest you read up on the IEEE floating point number system for a more in-depth explanation.
A: Matlab is just approximating real numbers with its binary floating-point numbers (dyadic rationals). You can approximate any real number arbitrarily closely with a finite binary sequence, but never exactly for irrational numbers e.g. $1/\sqrt 2$ or even rational numbers like $1/3$. You can, however, represent all real numbers in that interval by an infinite binary sequence.
Dyadic rationals are just $\frac a{2^b}$ where $a,b$ are integers.
