|
|
|
|
|
by hpcjoe
3029 days ago
|
|
Hrmmm. I thought something was fishy with the statement: "Tangent: in the real world, there are no real numbers". The reals are defined as the set of all rational and irrational numbers on the number line. See https://en.wikipedia.org/wiki/Real_number for a reasonably pedagogical discussion. There are reals, they do exist. In the "real" world (as poorly defined as that is). The issue is, fundamentally, what programming languages call "real numbers" are not real numbers. They are an approximation to a subset of the reals. This approximation has holes, and the implementations work to some degree to define regions of applicability, and regions of inapplicability. Usually people get hung up or caught in the various traps (inadvertently) added to the specs for "Reals". Its generally better to say "floating point numbers" than "Reals" in CS, simply because floating point is that subset of the Reals that we are accustomed to using. I definitely agree with the comment on rationals. I am a fan of Perl6, Julia and other languages ability to use rationals as first class number types. Sadly, as with other good ideas that require people alter their code/libraries, I fear this will not catch on due to implicit momentum of existing systems. |
|
From this, it’s fairly non-controvesial to say that only the computable reals exist; these are a tiny (measure-zero) subset of the reals.
If you go further and assume a fundamentally discrete universe (much more controvesial), then all you can really measure are integers.