Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. 1 = 0

1 = 0

Scheduled Pinned Locked Moved The Lounge
comdesign
68 Posts 38 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H HobbyProggy

    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");
    }

    Richard DeemingR Offline
    Richard DeemingR Offline
    Richard Deeming
    wrote on last edited by
    #29

    HobbyProggy wrote:

    Because the 6 at the end is ...

    But there isn't a 6 at the "end", because there isn't an "end"! :laugh: 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

    "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

    H 1 Reply Last reply
    0
    • Richard DeemingR Richard Deeming

      HobbyProggy wrote:

      Because the 6 at the end is ...

      But there isn't a 6 at the "end", because there isn't an "end"! :laugh: 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

      H Offline
      H Offline
      HobbyProggy
      wrote on last edited by
      #30

      STACK OVERFLOW :-O nvm

      Rules for the FOSW ![^]

      if(this.signature != "")
      {
      MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
      }
      else
      {
      MessageBox.Show("404-Signature not found");
      }

      1 Reply Last reply
      0
      • C CPallini

        You know, float are not real numbers. (likewise Computer Science is not Mathematics) :-D

        N Offline
        N Offline
        Nelek
        wrote on last edited by
        #31

        Do you mean they are imaginary? :doh: :doh: :doh: This is getting more and more difficult by moments. I think I am grabbing a bier, maybe seeing it double makes it easier :rolleyes: ;P :laugh: :laugh: I'll get 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.

        1 Reply Last reply
        0
        • H HobbyProggy

          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");
          }

          N Offline
          N Offline
          Nelek
          wrote on last edited by
          #32

          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 :laugh: :laugh: 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.

          1 Reply Last reply
          0
          • M Marc Clifton

            Ah, the ol' divide by zero trick. I think my math teacher did that when I was in 8th grade. Almost 40 years ago. And I'm sure it's older than that. ;) Marc

            Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

            C Offline
            C Offline
            Corporal Agarn
            wrote on last edited by
            #33

            Since I remember it from math about that time it has to be old. :-D How can I remember this but cannot find my car keys?

            Mongo: Mongo only pawn... in game of life.

            Y 1 Reply Last reply
            0
            • H HobbyProggy

              Dominic Burford wrote:

              x2 - y2 = xy - y2. Dividing by (x-y), obtain x + y = y.

              Wrong... aint it? x2 -y2 / (x-y) => x+y xy -y2 / (x-y) => y+y xy / x-y => 1*1/1-1 => (actually how could you divide this when there is a minus...) y2 / x-y => y/x-1 => (actually how could you devide this when there is a minus...) But i guess thats bullshit 2 because it "should"? be x2/x-y - y2/x-y which ruins everything :) Okay screw everything... you are wrong, thats all i can say :)

              Rules for the FOSW ![^]

              if(this.signature != "")
              {
              MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
              }
              else
              {
              MessageBox.Show("404-Signature not found");
              }

              K Offline
              K Offline
              kiLLe_512
              wrote on last edited by
              #34

              if(!string.IsNullOrEmpty(this.signature)) ftfy

              H 1 Reply Last reply
              0
              • Richard DeemingR Richard Deeming

                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

                K Offline
                K Offline
                kiLLe_512
                wrote on last edited by
                #35

                That's bloody brilliant!

                1 Reply Last reply
                0
                • H HobbyProggy

                  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");
                  }

                  F Offline
                  F Offline
                  Florgenator
                  wrote on last edited by
                  #36

                  Actually, yes 0.9999..... is in fact 1: x = 0.99999.... 10 x = 9.999999.... multiply by 10 10 x = 9 + 0.99999.... split right side into arithmetic expression 10 x = 9 + x replace 0.9999.... with "x" 9 x = 9 subtract "x" from both sides x = 1 divide by 9. without dividing by "0"

                  1 Reply Last reply
                  0
                  • K kiLLe_512

                    if(!string.IsNullOrEmpty(this.signature)) ftfy

                    H Offline
                    H Offline
                    HobbyProggy
                    wrote on last edited by
                    #37

                    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");
                    }

                    1 Reply Last reply
                    0
                    • D Dominic Burford

                      x = y. Then x2 = xy. Subtract the same thing from both sides: x2 - y2 = xy - y2. Dividing by (x-y), obtain x + y = y. Since x = y, we see that 2 y = y. Thus 2 = 1, since we started with y nonzero. Subtracting 1 from both sides, 1 = 0. :wtf:

                      "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                      M Offline
                      M Offline
                      MKJCP
                      wrote on last edited by
                      #38

                      If you divide by zero you get sucked into the mathematical black hole where all logic is lost. But if it were true that 1=0, would that simplify chip design? "A little knowledge is a dangerous thing, drink deeply or taste not."

                      Y 1 Reply Last reply
                      0
                      • D Dominic Burford

                        x = y. Then x2 = xy. Subtract the same thing from both sides: x2 - y2 = xy - y2. Dividing by (x-y), obtain x + y = y. Since x = y, we see that 2 y = y. Thus 2 = 1, since we started with y nonzero. Subtracting 1 from both sides, 1 = 0. :wtf:

                        "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                        B Offline
                        B Offline
                        BallsMcShaft
                        wrote on last edited by
                        #39

                        The second statement is false. if x = y, then x2 does not equal xy; x to the second power equals xy. For example: if 1=1 then 1(2) does not equal 1(1) Bullshit from the start, not to mention the division by zero

                        1 Reply Last reply
                        0
                        • H HobbyProggy

                          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");
                          }

                          U Offline
                          U Offline
                          User 12150297
                          wrote on last edited by
                          #40

                          Am I the only one that doesn't see the issue that we are not dividing 1 by 3.... 1 = 3/3... If you're going to divide by 3 on the 1... wouldn't you need to also need to divide 3/3 by 3 also... 1/3 = (3/3)/3.... which would both be .03333... ??

                          1 Reply Last reply
                          0
                          • D Dominic Burford

                            x = y. Then x2 = xy. Subtract the same thing from both sides: x2 - y2 = xy - y2. Dividing by (x-y), obtain x + y = y. Since x = y, we see that 2 y = y. Thus 2 = 1, since we started with y nonzero. Subtracting 1 from both sides, 1 = 0. :wtf:

                            "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                            U Offline
                            U Offline
                            User 11955655
                            wrote on last edited by
                            #41

                            Sorry guys but second line is false its only true when x=1 or 2 x = y. Then x2 = xy is wrong if x=3 , xy=9 x2=6 6 !=9 you can't divide this way if its proper algebra left side is x2 - y2   2(x-y) ------- = ------ = 2 <- left side of the equation (x-y)        (x-y) and obviously you cant separate (x-y) from the right side (xy - y2)/(x-y) != y sorry guys example is flawed and 1 != 0

                            1 Reply Last reply
                            0
                            • D Dominic Burford

                              x = y. Then x2 = xy. Subtract the same thing from both sides: x2 - y2 = xy - y2. Dividing by (x-y), obtain x + y = y. Since x = y, we see that 2 y = y. Thus 2 = 1, since we started with y nonzero. Subtracting 1 from both sides, 1 = 0. :wtf:

                              "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                              S Offline
                              S Offline
                              spa_war
                              wrote on last edited by
                              #42

                              Unfortunately, this "proof" falls apart at the 2nd line. x2 = xy only holds true for 0, 2, and -2. The correct equation is x^2 = xy. Still, a pretty interesting use of mathematics in an attempt to destroy all of our beliefs in what is thought to be true. :thumbsup:

                              1 Reply Last reply
                              0
                              • D Dominic Burford

                                x = y. Then x2 = xy. Subtract the same thing from both sides: x2 - y2 = xy - y2. Dividing by (x-y), obtain x + y = y. Since x = y, we see that 2 y = y. Thus 2 = 1, since we started with y nonzero. Subtracting 1 from both sides, 1 = 0. :wtf:

                                "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                                M Offline
                                M Offline
                                mBuchwald
                                wrote on last edited by
                                #43

                                This appears to work, but only because you are dividing by zero since (x-y) is, by definition of the first line, equal to zero.

                                1 Reply Last reply
                                0
                                • D Dominic Burford

                                  x = y. Then x2 = xy. Subtract the same thing from both sides: x2 - y2 = xy - y2. Dividing by (x-y), obtain x + y = y. Since x = y, we see that 2 y = y. Thus 2 = 1, since we started with y nonzero. Subtracting 1 from both sides, 1 = 0. :wtf:

                                  "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                                  D Offline
                                  D Offline
                                  Dominic Amann
                                  wrote on last edited by
                                  #44

                                  huh? I don't think x = y implies x2 = xy. How did you get that?

                                  M 1 Reply Last reply
                                  0
                                  • H HobbyProggy

                                    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");
                                    }

                                    W Offline
                                    W Offline
                                    willichan
                                    wrote on last edited by
                                    #45

                                    HobbyProggy wrote:

                                    because 1/3 is 0,333

                                    No. 1/3 does not equal 0.333. 1/3 is APPROXIMATELY 0.333. and 0.99999 is not technically 1. It is APPROXIMATELY 1 There is even a different symbol for it. 1/3≈0.333 (1/3 is approximately equal to 0.333) 0.99999≈1 (0.99999 is approximately equal to 1)

                                    Money makes the world go round ... but documentation moves the money.

                                    Y 1 Reply Last reply
                                    0
                                    • Sander RosselS Sander Rossel

                                      A high school teacher showed this to me some 10+ years back (feeling old now). All I can say is no.

                                      Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.

                                      Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

                                      Regards, Sander

                                      J Offline
                                      J Offline
                                      James Curran
                                      wrote on last edited by
                                      #46

                                      Quote:

                                      A high school teacher showed this to me some 10+ years back (feeling old now).

                                      10+ years is making you feel old? I saw that in high school 35+ years old..... (*) Even then, was able to figure out the flaw.

                                      Truth, James

                                      1 Reply Last reply
                                      0
                                      • D Dominic Burford

                                        x = y. Then x2 = xy. Subtract the same thing from both sides: x2 - y2 = xy - y2. Dividing by (x-y), obtain x + y = y. Since x = y, we see that 2 y = y. Thus 2 = 1, since we started with y nonzero. Subtracting 1 from both sides, 1 = 0. :wtf:

                                        "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                                        M Offline
                                        M Offline
                                        Member_5893260
                                        wrote on last edited by
                                        #47

                                        As has been pointed out here, at some point you're dividing erroneously. But, you can prove that 0 = any number you want, using the derivation of differential calculus, as described here[^]: if you plug numbers into the equation at stage 3, you can "prove" pretty much whatever you want to prove. But of course, math is a language, not reality - and you can speak nonsense in any language.

                                        1 Reply Last reply
                                        0
                                        • D Dominic Burford

                                          x = y. Then x2 = xy. Subtract the same thing from both sides: x2 - y2 = xy - y2. Dividing by (x-y), obtain x + y = y. Since x = y, we see that 2 y = y. Thus 2 = 1, since we started with y nonzero. Subtracting 1 from both sides, 1 = 0. :wtf:

                                          "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                                          M Offline
                                          M Offline
                                          Member 11711973
                                          wrote on last edited by
                                          #48

                                          If 1 = 0, then 1 - 1 = 0 - 1, which means -1 = 0. Contradiction, so 1 = 0 can't be true.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups