|
if(!string.IsNullOrEmpty(this.signature))
ftfy
|
|
|
|
|
Thank god signature is not an object you first have to convert .ToString() right?
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
|
A high school teacher showed this to me some 10+ years back (feeling old now).
All I can say is no.
|
|
|
|
|
The only thing i can agree with is that 1 != 3/3 (at least not exactly) because 1/3 is 0,333... and multiplied with 3 it is just 0,99999.... which is technically 1 but not 100%
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
Quote: 0,99999.... which is technically 1 but not 100% Uh?
|
|
|
|
|
Whats the matter ?
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
|
By definition, not by maths
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
By maths. There's no difference.
|
|
|
|
|
Allright, tell that the next flightcomputer that breakes down because he multiplied 0,333 and didn't get to 1
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
You know, float are not real numbers.
(likewise Computer Science is not Mathematics)
|
|
|
|
|
CPallini wrote: (likewise Computer Science is not Mathematics)
But its both logic And 0,999 is not 1 it's even written different
But i guess we could debate ages about that
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
Right: we could follow all the nines until we find a difference.
|
|
|
|
|
Take your pick: How Can 0.999... = 1? | Purplemath[^]
For example:
x = 0.999...
10x = 9.999...
10x - x = 9.000...
9x = 9
x = 1
EDIT: As Nagy said[^], 2+ hours ago.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
1/6 = 0,166666
->*6
0,9996
x = 0,9996
10x = 9,996
10x -x = 8,9964
9x = 8,9964
x = 0,9996
?
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
HobbyProggy wrote: 1/6 = 0,166666
->*6
0,9996
Nope - 6 × 0.1666... = 0.9999...
It's simple multiplication:
1 x 6 = 6 (0.6)
6 x 6 = 36 = add 3 to the column on the left (6 + 3 = 9), and put 6 in this column (0.96)
6 x 6 = 36 = add 3 to the column on the left (6 + 3 = 9), and put 6 in this column (0.996)
6 x 6 = 36 = add 3 to the column on the left (6 + 3 = 9), and put 6 in this column (0.9996)
6 x 6 = 36 = add 3 to the column on the left (6 + 3 = 9), and put 6 in this column (0.99996)
etc.
Because you're repeating the operation an infinite number of times, there's no point where you stop and leave the last digit as 6 . There's always another digit to the right which needs to be multiplied by 6 , carrying the 3 into the current column.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
So this works only for 0.999999 ?
Because the 6 at the end is in this case important to show that it wont be a 1 in the end
But nevermind, this is all just playing with numbers
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
HobbyProggy wrote: Because the 6 at the end is ...
But there isn't a 6 at the "end", because there isn't an "end"!
Think of it like this:
using System;
static class Program
{
static void Main()
{
while (true)
{
Console.WriteLine("9");
}
Console.WriteLine("Squirrel!");
}
}
If you run that program, how long will you have to wait before it prints "Squirrel"?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
STACK OVERFLOW
nvm
Rules for the FOSW ![ ^]
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
mmm
working by 9, not working by 6
what about 69? does it works?
Oh, wait... I think I stop now since I am about to break the KSS rule
I am still on the way getting my coat
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
|
|
Well...
0.999... is
0+(9/10) + (9/100) + (9/1000) +...
which is 0+9*((1/10)+(1/100)+(1/1000)+...)
which is 9* (sum(1/10^n))
where the sum runs over n for n=1 to infinity.
Now for the same sum, if n ran from 0 to infinity, there is a convenient formula, that says it is (I'll mark this with a capital S to distinguish it from the one we're trying to calculate):
Sum(1/10^n)=1+1/10+1/100+...=1/(1-(1/10))=1/(9/10)=10/9
therefore the sum we want is
1/10+1/100+...=(10/9)-1=1/9
therefore
0.999...=9*(1/9)=1
So it's math.
On the other hand, computer calculated numbers are approximations, and in the binary system at that, and this is why you get all those rounding errors.
But I get the feeling you already know all this, and that you are just toying with us obsessive compulsive types.
Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων!
(Alas! We're devoured by lamb-guised wolves!)
|
|
|
|
|
if the numerator and denominator are equal then the value must be 1.
Then the second part is almost right, but you missed a very important point, a recurring value is only an approximation rather than the absolute. 1/3 is absolute, but the decimal 0.3. is only an approximation.
Proof, without bad maths of the 9's reccuring -
0.9. == 1
Multiply by 10:
9.9. = 10
Subtract the original:
9.9. - 0.9. = 9
9 = 9
QED.
This is accepted as proper maths, the 1=0 using division by zero is, however, not.
veni bibi saltavi
|
|
|
|