News for hackers. Stuff that matters.
Re:Now I’m calculating with constructive reals by naikrovek on Tuesday April 26, 2022 @10:48PM (#31175712)
a miniscule point in the article which I can't get past:

0.99 recurring is not the same as 1. how can it be? the difference is infinitely small and the difference is not, and can not be zero.

I have been called names because of this.

"0.99 recurring" is an approximation and "1.0" is not, so how can they be considered the same?

the world is dumb and I want off

Re:Now I’m calculating with constructive reals by xeyownt on Wednesday April 27, 2022 @01:28AM (#31176647)
You are confusing the set of converging numbers

   0,9
   0,99
   0,999
   ...
and the number it is converging to, aka

   0,999...
which is the same as 1. That number (written as 0,999... or 1) is NOT in the set.

Another way to convince yourself: take 1. Divide by 9, you get 0,111... . Now multiply it back by 9. You get 0,999..., but this must be the same as 9.

Also, 0,9999... is not a regular decimal number. It is a writing CONVENTION. This is in fact exactly the same as the fraction 9 / 9, which is exactly 1.

Re:Now I’m calculating with constructive reals by civilized on Tuesday April 26, 2022 @11:26PM (#31175968)
In standard mathematics there is no such thing as an infinitely small number. All nonzero standard real numbers have some finite separation from zero.

The difference between 0.9 recurring and 1 would have to be infinitely small, as you note. So if it's a number, it can only be zero. It can't be any nonzero number because none of them are infinitely small.

You may not like it intuitively, but this way of thinking is perfectly rigorous and logical and works very well for all practical calculations. Admitting infinitely small numbers makes math way more complicated (nonstandard analysis) and under the hood it ultimately falls back on the standard model anyway.

Re:Now I’m calculating with constructive reals by leephillips on Wednesday April 27, 2022 @12:23AM (#31176267)
I wouldn’t say nonstandard analysis is way more complicated. It replaces the use of limits with a different (hyperreal) number system. That makes some things look simpler.
Re:Now I’m calculating with constructive reals by hither_shores on Wednesday April 27, 2022 @03:00AM (#31177105)
Which is exactly why nonstandard analysis is way more complicated: the usual construction of the hyperreals involves some somewhat technical set theory, and even a relatively fast and loose version is going to require at least a first course in abstract algebra to be intelligible.
Re:Now I’m calculating with constructive reals by lmm on Wednesday April 27, 2022 @12:18AM (#31176236)
The map is not the territory, and a way of notating a number is not the number itself.

Decimal expansions are convenient for most purposes, but they have this property that sometimes there are two different ways of notating the same number. This is unfortunate, but unless you can come up with a better notation (for Dedekind cuts over the rationals, or some other way of constructing the real numbers), we have to live with it.

(Recurring decimals are not "approximation". They're notation for specific individual real numbers)

Re:Now I’m calculating with constructive reals by yakubin on Tuesday April 26, 2022 @11:07PM (#31175867)
If what you have a problem with is the statement that "0.9999... = 1", then there are two proofs of that:

1. Analytical

0.9999... = \sum_{n=1} ^{\infty} (9 * 0.1^n) = 0.9/(1 - 0.1) = 0.9/0.9 = 1

The first equality is by definition of strings of the form "0.abcdef...". The second is the sum of geometric series.

2. Algebraical

  x = 0.9999...
  10x = 9.99999...
  9x = 10x - x = 9.9999... - 0.9999... = 9
  x = 1
Re:Now I’m calculating with constructive reals by jhanschoo on Tuesday April 26, 2022 @11:34PM (#31176004)
0.999... is as much an approximation to 1 as 0.333... is to 1/3. That is, not at all, since we use these representations to stand in for the rational number that is their limit. You will find that exactly the numbers that can be represented exactly in finite digits (a.k.a. ending in 000...) have two representations.
Re:Now I’m calculating with constructive reals by jasomill on Wednesday April 27, 2022 @01:57AM (#31176805)
This holds for bases other than 10 as well. In base 3, 1/3 has two representations 0.1 and 0.0222...
Re:Now I’m calculating with constructive reals by bee_rider on Wednesday April 27, 2022 @12:18AM (#31176235)
Have you checked the wikipedia article on .99 recurring? This seems to be one of the first things taught where a personal who is reasonably mathematically savvy and has an intuitive grasp of math might actually trip up, so teaching this fact has become the subject of endless discussion. I don't think you should be called names for this, though -- you are wrong, but you are in good company as far as I've seen.
Re:Now I’m calculating with constructive reals by ChrisLomont on Tuesday April 26, 2022 @10:59PM (#31175811)
Any two real numbers that are not the same has another distinct number between them; the midpoint for example.

No number fits between 1 and 0.99999....., so they are the same number.

Re:Now I’m calculating with constructive reals by hummusandsushi on Tuesday April 26, 2022 @10:56PM (#31175770)
It may be unintuitive, but 0.99 recurring is equal to 1 and this can be shown in many ways.

qntm has apparently compiled some number of them: https://qntm.org/pointnine

Re:Now I’m calculating with constructive reals by pdonis on Tuesday April 26, 2022 @10:57PM (#31175778)
> 0.99 recurring is not the same as 1. how can it be?

Because 0.99 recurring is another way of writing an infinite series whose sum can be proved to be 1.

> 0.99 recurring" is an approximation

No, it isn't. See above.

Re:Now I’m calculating with constructive reals by zuminator on Tuesday April 26, 2022 @11:14PM (#31175908)
0.999 is just a geometric series of fractions: 9/10 + 9/100 + 9/1000 etc. Do you remember how to calculate the sum of a convergent geometric series? The formula is a/(1-r), where a is the coefficient and r is the ratio. In this case, a = 9/10 and r = 1/10, so we have

a/(1-r)= (9/10)/(1-(1/10))= (9/10)/(9/10)= 1

If you don't believe that infinite series can be summed, then what is your solution to Zeno's Paradox?[0].

Also, conveniently enough, there's a pretty thorough Wikipedia article on the whole .999 question. [1]

[0] https://en.wikipedia.org/wiki/Infinity#Zeno:_Achilles_and_th... [1] https://en.wikipedia.org/wiki/0.999...

Re:Now I’m calculating with constructive reals by erodommoc on Tuesday April 26, 2022 @11:03PM (#31175842)
Right - every time you add a '9', the difference gets smaller, but it's still there, it never completely goes away no matter how arbitrarily large number of times you repeat the process. However, most math doesn't treat '0.99 repeating' as an algorithm to approximate a number, but as an _actual number_. There is no 'adding another 9', all of the infinite number of 9's are added at the same time. It's (at least to me) very different from the intuitive meaning of '0.99...', but if you treat it as the mathematical object '0.99...', not as 'start with 0.99, and keep adding 9's as necessary to approximate', then 0.999999... does in fact equal 1.00000... because it's impossible to compute a number in between them. (edited to hopefully improve the explanation)
Re:Now I’m calculating with constructive reals by hansvm on Wednesday April 27, 2022 @12:37AM (#31176352)
Even if you do have infinitesimals, no reasonable definition of 0.99 repeating is anything except 1.0:

Suppose you have a number space with

a) a sequence of approximations 0.9, 0.99, ... (not necessarily indexed by the naturals, just some infinite set that gets bigger)

b) 1.0

c) enough "niceties" like (a-b)!=0 for a!=b, addition existing, yada yada

Suppose that some "solution" exists in that number space for your favorite way of writing 0.99 repeating. One reasonable thing to expect from such a solution is that your sequence of approximations actually get closer to (or eventually equal) it.

That one constraint (that your better approximations are actually better approximations) forces any possible solution to be exactly equal to 1.0.

That doesn't necessarily mean the solution is 1.0, just that if it isn't (and is something infinitesimally different) then one of the assumptions must have been violated. Unfortunately, most of the assumptions were simply describing the problem, so the only real possibilities for failure (if we assume some solution exists) are the foundations of math being fundamentally flawed (it might happen, but that doesn't seem plausible here), or the number space we're considering being considerably less "nice" than the reals (i.e., not nice enough for most of modern physics and whatnot).

You could of course instead say that it's dumb that we can define 0.99 recurring to actually equal something, but that's just quibbling over the names and representations that we're' giving to things -- sequences of better approximations exist, 1.0 exists, and there exists some partial function turning sequences of approximations into their "limits", and calling this particular instance something other than 0.99 recurring doesn't really get rid of the fundamental idea.

All of that aside, you can of course get infinitesimal approximations in other spaces (like the hyperreals), and those infinitesimal approximations are better than any real approximations, but the _actual definition_ of 0.99 repeating isn't equal to any of those approximations -- they just progressively get closer to 1.0.

Re:Now I’m calculating with constructive reals by ketralnis on Wednesday April 27, 2022 @12:18AM (#31176241)
It’s widely accepted, with proofs and all, to be true in the mathematical system that we use for most purposes.

There may be an alternative system in which that’s not true but for it to be not true you’d have to square it with the consequences of losing some axioms to those aforementioned proofs. You could probably make a whole career in academia out of constructing that system.

Give it a shot and prove all of those career mathematicians with aggregate millennia of experience wrong; you won’t make millions but there might be some cool insights in such a system. Probably something in the realm of the reals vs the computable numbers, which even has applicability in e.g. what axioms we can provably losslessly rely on in FPUs (where we pretend we work on the reals or at least computables but don’t really)

> I have been called names because of this […] the world is dumb and I want off

I suspect these are correlated more strongly to each other than to your mathematical insights

Re:Now I’m calculating with constructive reals by svat on Tuesday April 26, 2022 @11:00PM (#31175816)
The Wikipedia article is (or was) quite good: https://en.wikipedia.org/wiki/0.999...
Re:Now I’m calculating with constructive reals by amelius on Wednesday April 27, 2022 @06:01AM (#31178150)
It's the difference between:

    (lim x->0 1-x) == 1
and

    lim x->0 (1-x == 1)
The top one yields True, the bottom one False.
Re:Now I’m calculating with constructive reals by jonsen on Wednesday April 27, 2022 @11:07AM (#31180813)

  > lim x->0 (1-x == 1)
How do you define the limit of a sequence of truth values?
Re:Now I’m calculating with constructive reals by amelius on Wednesday April 27, 2022 @07:24PM (#31187072)
Same as when using 1 and 0 for True and False.
Re:Now I’m calculating with constructive reals by peterhalburt33 on Wednesday April 27, 2022 @01:22AM (#31176620)
I know this might be a somewhat long and tangential answer, but I wanted to give a different viewpoint, because this is such an unintuitive fact.

Firstly, let me just say, for how much time we spend learning about the number line and calculating with Real numbers, they aren't the cute and familiar number system you think they are. Beneath the facade of familiarity lie a whole bunch of technical constructs and counterintuitive facts which justify the suffering of many undergraduates taking their first course in Real analysis (and the existence of books such as "Counterexamples in Analysis").

Lets start off by trying to define the real number system so that we can agree what a real number actually is - it's not unreasonable to think that .999... might be a fundamentally different object than 1, perhaps belonging to a set of "approximate" numbers. Without discussing any of the technicalities, I think a reasonable first stab at a definition of the Reals between could be the set of all decimal numbers (e.g. 111... or 7.500...).

On to my main point, how should we define equality of two real numbers? The most naively appealing answer would be through equality of their decimal representations (i.e. two numbers are equal if and only if their decimal expansions are equal, and if the decimal representations are different then the real numbers are different). Under this viewpoint, each real number has a unique decimal expansion (since real numbers are in one to one correspondence with decimals, and different expansions mean different numbers), and .999... is not equal to 1 (or 1.000...) because their decimal representations are different.

However, since there are no "gaps" in the Real number line, there must be some other number between the two. What would the decimal representation of this number look like? If .999... and 1 are truly different, then the mean should lie strictly between the two.

(1 + .999...)/2 = .5 + .499... = .999..

Well that's frustrating. What about trying to "squeeze" another number between the two decimal digit by decimal digit? The first decimal digit of this number has to be 9 (since it is less than 1, but greater than .999...), and by the same reasoning so must the second digit, and on and on...

Perhaps 1 - .999... is an "infinitesimal" real number given by .000... infinitely repeating followed by a 1 at the end. If you believe this, let's try and write out the decimal expansion of this number digit by digit. Of course the first decimal digit is 0, along with the second, and the third and so on. From this information, the decimal expansion of this "infinitesimal" number is a string of 0's (i.e. 0). You might object that I'm not considering the 1 at the end: what you really meant was a sequence of numbers getting smaller and smaller i.e. whatever number the sequence .01, .001, .0001 and so on tends to. But if this sequence is to represent a real number, it must have a single unique decimal expansion at the end of the day, and there is no escaping that all of the digits must be 0.

At this point, it should start to be apparent that the idea that every real number has a decimal expansion, and that the expansion must be unique (i.e. Real numbers with different decimal expansions are different numbers) are in conflict with each other. But why should we define equality through representation? After all, 1/3 and .333... infinitely repeating define the same number, but have quite different representations.

I hate to be reductive, but for whatever reason mathematicians have decided that the benefits of allowing the real number system outweigh the drawbacks of allowing non-unique representations of these numbers. In fact, one sees this idea repeated over and over throughout mathematics e.g. completeness of Lp spaces outweighs the drawback of generalizing measure and defining Lp functions as equivalence classes equal a.e., expanding the definition of derivatives to allow for weak differentiability permits a wider class of solutions to PDEs (such as shocks) and so on. There's always some sort of trade-off to be made between nice behavior and power + generality, and while it is often painful to adapt to, it pays off in dividends to go beyond one's intuition in mathematics.

Re:Now I’m calculating with constructive reals by simiones on Wednesday April 27, 2022 @07:06AM (#31178484)
I would note that the fact that 0.(9) = 1 can be talked about and shown using just the Rational numbers, you don't need to invoke the Reals.
Re:Now I’m calculating with constructive reals by peterhalburt33 on Wednesday April 27, 2022 @02:43PM (#31184071)
Completely correct. Too lazy to amend my answer, but even rational numbers don’t have a unique decimal representation.
Re:Now I’m calculating with constructive reals by jonsen on Wednesday April 27, 2022 @11:16AM (#31180949)
> (1 + .999...)/2 = .5 + .499... = .999..

Why is .999.../2 = .499... ?

Re:Now I’m calculating with constructive reals by peterhalburt33 on Wednesday April 27, 2022 @02:44PM (#31184093)
You can compute it digit by digit:

.999…/2 = .45 + .045 + .0045 + …

Re:Now I’m calculating with constructive reals by jonsen on Wednesday April 27, 2022 @03:00PM (#31184306)
Yes, but your argument goes circular with this. And someone could argue that

  .999.../2 = .499...  <=>  .999... = 2*.499... = .499...+.499...
which "surely must" have 8 as the rightmost digit. Moving it further away from 1.
Re:Now I’m calculating with constructive reals by peterhalburt33 on Wednesday April 27, 2022 @04:44PM (#31185552)
Agreed this isn’t airtight, but if you accept the premise that real numbers are specified by their sequence decimal digits: .499…+.499… has 9 as its first digit after the decimal, 9 as its second and so on - the only other number that has this decimal expansion is .999… infinitely repeating, so these must be the same numbers.