Home » Community » Forums » GDNet Lounge » Periodic numbers, 1.9999999 == 2?
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic

Page:   1 2 3 4 5 6 »»

 Last Thread Next Thread 
 Periodic numbers, 1.9999999 == 2?
Post New Topic  Post Reply 
Some days ago I discovered something that really shocked me
There's this way of converting a number with a periodic part into a fraction
for example, if I have 1.2222222222..

A = 1.22222222..
10 A = 12.2222222..
(subtracting A from both parts)
9 A = 11
A = 11/9

And that's OK. But If I have a number ending with a periodic 9, that's what happens:

A = 1.9999999
10 A = 19.999999
9 A = 18
A = 18/9 = 2!!!

So 1.999999999.. is mathematically equal to 2! Is that possible? There must be something wrong. Probably in the second line, where I multiply by 10 and just shift the periodic numbers, there is probably some approximation error going on here. Maybe there should be a 0 digit, and not just another 9, infinitely to the right or something like that. Any ideas?

p.s. I was posting this in Math & Physics, but I think it's more suited here actually.

Edit: little error in first computation :P

[Edited by - Arcibald Wearlot on May 26, 2005 4:02:51 PM]

 User Rating: 1053   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

0.999... == 1
1.999... == 2

ZOMG!

-------
[ lalala Washu eats poop ]

 User Rating: 1861   |  Rate This User  Send Private MessageView ProfileView JournalView GD Showcase Entries Report this Post to a Moderator | Link

It's both possible and correct. Blizzard Enterainment said so.

 User Rating: 1791   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I predict this thread will become way longer than necessary.

 User Rating: 1148   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

We had a thread about this before, and it turned into a ridiculous argument.

YES, 1.99999... = 2. IT'S TRUE.

When we talk about repeating decimals we're referring to infinities, and regular arithmetic isn't properly equipped to handle them very well. But if you use some more advanced mathematics (limits), you can very easily prove that this is true.

 User Rating: 1357   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by Jesper T
I predict this thread will become way longer than necessary.
37 pages of the same rehashed "maths"? Can't wait

.................................................................................................................................................................
[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]


 User Rating: 1962   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Yeah I like Twix's explaination the best. When you deal with infinity, weird stuff happens. You can't use plain old ordinary logic on things dealing with infinity.

I mean, the idea of repeating decimals is bordering on illogical to begin with. How can you have an infinite number of digits? Where would you put them all??? Even if each digit was really small, you would need a lot of space to put them somewhere. Maybe if you had really big buckets. But even that wouldn't be enough!! You would need an infinite number of buckets! But where do you get enough trees to get the wood to make an infinite number of buckets???? The mind boggles.

 User Rating: 1494   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Quote:
Original post by Arcibald Wearlot
A = 1.22222222..
10 A = 12.2222222..
(subtracting A from both parts)
9 A = 10
A = 10/9

And that's OK. But If I have a number ending with a periodic 9, that's what happens:


That is ok? I do hope you mean 11/9



 User Rating: 1598   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

12.22222222...
-1.22222222...
--------------
11.00000000...

Therefore, 0.99999.... ~= 1

 User Rating: 1692   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

A much more straight forward way of making fractions is just to throw the repeating part over an equal number of 9s.

0.12121212... == 12/99
8.12121212... == 8 12/99
5.105312105312... == 5 105312/999999

This suggests an alternate reasoning about 0.9999... == 1:

1/9 = 0.11111...
2/9 = 0.22222...
3/9 = 0.33333...
4/9 = 0.44444...
5/9 = 0.55555...
6/9 = 0.66666...
7/9 = 0.77777...
8/9 = 0.88888...
9/9 = 0.99999...

Not mathematically rigorous, of course, but enough to fuck with your head.

CM

 User Rating: 1692   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

#include <iostream>

int main()
 {
  struct _{char value;_*next;}nine={'9',&nine},point={'.',&nine},zero={'0',&point},*digit=&zero;
  
  for(; digit; digit=digit->next)
   std::cout << digit->value;
 }



 User Rating: 1791   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by Arcibald Wearlot
So 1.999999999.. is mathematically equal to 2! Is that possible?

Not only is it possible, it's a tautology. =)

Here's an informal proof. Let's start with what the notion of a decimal number means:

[1] 0.k1k2 ... = k1/10 + k2/100 + ... + kp/10p + ...

Now let's apply the specific case where the digits after the decimal point are all 9s. This gives

[2] 0.999... = 9/10 + 9/100 + ... = 9/101 + 9/102 + ...

Now let's show this continuing pattern as an infinite sum:

[3] 0.999... = Sum[n = 1 --> infinity] { 9/10n }

The above statement says that "0.999..." is equal to the sum of the series "9/101 + 9/102 + ...", which is just a restatement of [2]. Now instead of looking at the infinite sum, let's just look at part of the infinite sum:

[4] 0.999... = Sum[n = 1 --> m] { 9/10n }

which is the partial series ""9/101 + 9/102 + ... + 9/10m". Now let's consider what happens as m gets bigger and bigger:

[5] 0.999... = Limit[m --> infinity] { Sum[n = 1 --> m] { 9/10n } }

This is equal to

[6] 0.999... = Limit[m --> infinity] { Sum[n = 1 --> m] { 9(1 - 10-(m+1))/(1 - 1/10) } }

You can verify yourself by plugging any value for m and seeing it's still just statement [5]. Reducing the denominator gives us

[7] 0.999... = Limit[m --> infinity] { Sum[n = 1 --> m] { 9(1 - 10-(m+1))/(9/10) } }

and allowing m to get increasingly larger gives us the limit,

[8] 0.999... = .9/(9/10)

[9] 0.999... = .9/.9

which leaves us with the final step,

[10] 0.999... = 1

QED! A more formal proof will require that you construct the number system from scratch. If you're really interested, you can look into Cauchy sequences.

 User Rating: 1836   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

We learned that at my school in the seventh grade!



 User Rating: 1081   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Because 1/3 = 0.333~
Then    3*1/3 = 0.999~

Because 3*1/3 = 1
And     3*1/3 = 0.999~
Then    1 = 0.999~

Because 1+1 = 2
And     1 = 0.999~
Then    2 = 1.999~



 User Rating: 1618   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Probably in the second line, where I multiply by 10 and just shift the periodic numbers, there is probably some approximation error going on here. Maybe there should be a 0 digit, and not just another 9, infinitely to the right or something like that. Any ideas?

Yeah, that's correct. A recurring decimal place doesn't actually have any bearing on this problem at all, it just makes the error harder to spot. When you multiply a number with an infinitely recurring portion, you're in fact adding a zero to the end at infinity + 1. It's the exact same thing as if you had no recurring digits at all. For example, consider this non-recurring case:

A = 1.999
10A = 19.990
9A = 19.990 - 1.999 = 17.991
8A = 17.991 - 1.999 = 15.992
7A = 15.992 - 1.999 = 13.993
6A = 13.993 - 1.999 = 11.994
5A = 11.994 - 1.999 = 9.995
4A = 9.995 - 1.999 = 7.996
3A = 7.996 - 1.999 = 5.997
2A = 5.997 - 1.999 = 3.998
1A = 3.998 - 1.999 = 1.999

If you now assume that A is 1.999 recurring, it doesn't change the outcome, the zero digit is now just added at infinity plus 1, and keeps the result just under 2.

 User Rating: 1630   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by smart_idiot
*** Source Snippet Removed ***

Pfft, you think that's unnecessarily cryptic?

(setf num '(.9 9) (cddr num) (cdr num) ^__^ (loop for x in num do (princ x)))




Well, that was my intellectual contribution of the day.

 User Rating: 1357   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by Nemesis2k2
Yeah, that's correct. A recurring decimal place doesn't actually have any bearing on this problem at all, it just makes the error harder to spot. When you multiply a number with an infinitely recurring portion, you're in fact adding a zero to the end at infinity + 1.

There's no such thing as infinity + 1. You really can't use logic that works for non-recurring decimals to deal with their infinite cousins.

 User Rating: 1357   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by twix
Quote:
Original post by Nemesis2k2
Yeah, that's correct. A recurring decimal place doesn't actually have any bearing on this problem at all, it just makes the error harder to spot. When you multiply a number with an infinitely recurring portion, you're in fact adding a zero to the end at infinity + 1.

There's no such thing as infinity + 1.

Of course there is. If there weren't, then 1.999999... would be 2 and not 1.99999... Duh.

Not to mention the various arguments I wouldn't have won with my brother about precicely how much cooler Batman was than Superman.

CM

 User Rating: 1692   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

A more straight forward demonstration (if you want, just take out the [xxx] and you can even do this on your calculator):

A = 1.99[...]9

10A = 1.99[...]9 * 10 = 19.9[...]9

9A = 10A - A = 19.9[...]9 - 1.99[...]9 = 17.9[...]91

A = 9A / 9 = 17.9[...]91 / 9 = 1.99[...]9





 User Rating: 2038   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Quote:
Original post by Michalson
A more straight forward demonstration (if you want, just take out the [xxx] and you can even do this on your calculator):

A = 1.99[...]9

10A = 1.99[...]9 * 10 = 19.9[...]9

9A = 10A - A = 19.9[...]9 - 1.99[...]9 = 17.9[...]91

A = 9A / 9 = 17.9[...]91 / 9 = 1.99[...]9

Ooh, you cheater. You're explicitly referring to the last digit in the decimal, which by definition does not exist.

 User Rating: 1357   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by Nemesis2k2
Yeah, that's correct. A recurring decimal place doesn't actually have any bearing on this problem at all, it just makes the error harder to spot. When you multiply a number with an infinitely recurring portion, you're in fact adding a zero to the end at infinity + 1.

As twix points out, there is no such thing as infinity+1. In addition, it has everything to do with the decimal place.

1/3 is only 0.333~ in base ten. In base three, for example, it would be written simply 0.13 (because the first fractional digit would be worth 1/3).

In base three, 0.999~, which is 3*1/3 which is 3/3 which is 1 could only be written 13: there is no 'decimal' representation of 0.333~ in base three. Because 13 = 110, and 13 = 0.999~10, it follows that 110 = 0.999~10.

 User Rating: 1618   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
As twix points out, there is no such thing as infinity+1.

Conceptually, there is. In mathematical reality, there isn't even such a thing as infinity.

 User Rating: 1630   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

lim(.999... -> 1) = 2

 User Rating: 1148   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by Nemesis2k2
Quote:
As twix points out, there is no such thing as infinity+1.

Conceptually, there is. In mathematical reality, there isn't even such a thing as infinity.

There are mathematical ways of dealing with infinity, of course, and none of them allow you to define infinity + 1 as anything. Even conceptually, if you lose all mathematical rigor and say that N = infinity, the very concept of infinity implies that there can be no number M such that M > N. If there is such a number N still isn't infinite enough.

 User Rating: 1357   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

As a further demonstration, consider one half -- 1/2. Obviously, 1/2 = 0.5, 2*1/2 = 2/2 = 1. So 2*0.5 = 1.

But in base three, 1/2 is written as the periodic fraction 0.111...3. We know that multiplying 1/2 by 2 gives 1 and it must do this in every base. Ergo, 2*0.111...3 = 13.

If you accept that 2 * 0.5 = 1, you must also accept that 2 * 0.111~3 = 1. If periodic fractions behave this way in base three, why should they not also behave this way in base ten?

Here in MathWorld there is a mention that the hexadecimal representation of 0.1 (which terminates in decimal notation) is the infinite expression 0.1999...h..

 User Rating: 1618   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link
Page:   1 2 3 4 5 6 »»
All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: