0.99999... != 1
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
ok........the answer is 0.99999... != 1.
simple.
if it were the same, then it would be written the same.
alright...............so....same thing, different numbers:
0.3333...... and 0.4
0.3333..... == 3/9 or 1/3. 0.4 is not 1/3. 0.4 is 2/5.
now....
make fractions...set them equal...cross multiply...... and you get: 30 = 36. that doesn't work. so, no. 0.9999... and 1 are not equal
simple.
if it were the same, then it would be written the same.
alright...............so....same thing, different numbers:
0.3333...... and 0.4
0.3333..... == 3/9 or 1/3. 0.4 is not 1/3. 0.4 is 2/5.
now....
make fractions...set them equal...cross multiply...... and you get: 30 = 36. that doesn't work. so, no. 0.9999... and 1 are not equal
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Imbesile... go get a Degree in Maths and then attempt to discuss it when you learn that it is accepted that 0.99... is equal to 1. For the record there is not an infinetly small different between 0.33... and 0.4 obviously.piranha wrote:ok........the answer is 0.99999... != 1.
simple.
if it were the same, then it would be written the same.
alright...............so....same thing, different numbers:
0.3333...... and 0.4
0.3333..... == 3/9 or 1/3. 0.4 is not 1/3. 0.4 is 2/5.
now....
make fractions...set them equal...cross multiply...... and you get: 30 = 36. that doesn't work. so, no. 0.9999... and 1 are not equal
-
- Member
- Posts: 97
- Joined: Thu Mar 15, 2007 2:27 pm
I maintain that it does not equal one, it WOULD equal 0.0(repeated)1, except that this cannot exist, becuase the 1 would never be reached, the zero's go forever.
So i propose an imaginary number to represent 1-0.99999999999....., it will be a 'w' with a big swoosh at the end! Who's with me?!
A simple explanation... (*partially joking*)
'a' != 'b'
1 != 2
1.9 != 2
'a' != 2
'a' == 'a'
0.99999 != 1
1 == 1
0.9999 == 0.9999
THEY'RE BOTH DIFFERENT CONSTANTS..... THEY CANNOT BE EQUAL!!!!!
So i propose an imaginary number to represent 1-0.99999999999....., it will be a 'w' with a big swoosh at the end! Who's with me?!
A simple explanation... (*partially joking*)
'a' != 'b'
1 != 2
1.9 != 2
'a' != 2
'a' == 'a'
0.99999 != 1
1 == 1
0.9999 == 0.9999
THEY'RE BOTH DIFFERENT CONSTANTS..... THEY CANNOT BE EQUAL!!!!!
Yeah you don't even need Degree level maths... why not go to school and learn some simple maths like calculus?jnc100 wrote:This argument has probably been posted before but I can't be bothered to go back through the post to check:
If two numbers are different then there has to be a number between them.
Can anyone suggest a number between 0.999999.... and 1?
Thought not.
What's between the numbers 1 and 2 in the set of integers? .jnc100 wrote:This argument has probably been posted before but I can't be bothered to go back through the post to check:
If two numbers are different then there has to be a number between them.
Can anyone suggest a number between 0.999999.... and 1?
Thought not.
I thought this i a general known issue:
in mathmatics 0.9999999.. != 1 and in computerscience 0.9999999.. == 1.
mainly because of a design flaw of the floating point unit.
hence the conditional checks for small deltas
in mathmatics 0.9999999.. != 1 and in computerscience 0.9999999.. == 1.
mainly because of a design flaw of the floating point unit.
hence the conditional checks for small deltas
Code: Select all
#define DELTA 0.0000000001 // or something similar small
if(((f1 -f2) < DELTA) || ((f1 -f2) < -DELTA)) {
//- floats are near enough
}
Author of COBOS
Hi,
0.9999999.. == 1
It's easy to prove too:
1 == 1
1 == 3/3
1 == 3 * (1/3)
1 == 3 * (0.3333...)
1 == 0.999...
The most common problem is that CPUs work in binary and some decimal numbers can't be represented precisely in binary. For example, "0.1" in binary repeats forever (it becomes 0.0001100110011001100110011...), so the CPU will either truncate it or round it to make it fit. This means that "(1 / 10) * 10" might give the answer 1.00000000000001 because the intermediate value "1 / 10" can't be represented precisely.
In the same way, for "(1 / 3) * 3" the CPU might calculate "1 / 3" as 0.33333333333 (not recurring) and then decide that the final answer is 0.99999999 (also not recurring), which is wrong because of precision loss. If the multiplication was done first then the CPU would give the correct answer (you could even get the correct answer using integers in this case).
Cheers,
Brendan
No.os64dev wrote:in mathmatics 0.9999999.. != 1
0.9999999.. == 1
It's easy to prove too:
1 == 1
1 == 3/3
1 == 3 * (1/3)
1 == 3 * (0.3333...)
1 == 0.999...
The checks for small deltas are needed because of lack of precision, which in turn is caused by a finite number of bits used to store the significand. It's not a "flaw" in the design of the floating point unit (and SSE) - it's just a natural/unavoidable consequence of trying to store large things in small places.os64dev wrote:and in computerscience 0.9999999.. == 1.
mainly because of a design flaw of the floating point unit.
hence the conditional checks for small deltas
The most common problem is that CPUs work in binary and some decimal numbers can't be represented precisely in binary. For example, "0.1" in binary repeats forever (it becomes 0.0001100110011001100110011...), so the CPU will either truncate it or round it to make it fit. This means that "(1 / 10) * 10" might give the answer 1.00000000000001 because the intermediate value "1 / 10" can't be represented precisely.
In the same way, for "(1 / 3) * 3" the CPU might calculate "1 / 3" as 0.33333333333 (not recurring) and then decide that the final answer is 0.99999999 (also not recurring), which is wrong because of precision loss. If the multiplication was done first then the CPU would give the correct answer (you could even get the correct answer using integers in this case).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Code: Select all
a = b
a2 = ab
a2 - b2 = ab-b2
(a-b)(a+b) = b(a-b)
a+b = b
b+b = b
2b = b
2 = 1
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Thanks for reminding me to put that on some public blackboard.AJ wrote:Code: Select all
a = b a2 = ab a2 - b2 = ab-b2 (a-b)(a+b) = b(a-b) a+b = b b+b = b 2b = b 2 = 1