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. 10 divided by 3 *multiplied with 3 is not 10 again??

10 divided by 3 *multiplied with 3 is not 10 again??

Scheduled Pinned Locked Moved The Lounge
question
24 Posts 8 Posters 0 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.
  • V Vikram A Punathambekar

    ensger wrote:

    1 / infinite = 0

    Huh? I thought quite a few people made it clear last night that it's not. It's Lt n->∞ 1/n that is 0. 10 / 3 = 3.3 10 / 3 * 3 = 10. [edit]Dude, there's a maths forum.[/edit]

    Cheers, Vikram.


    "whoever I am, I'm not other people" - Corinna John.

    E Offline
    E Offline
    ensger
    wrote on last edited by
    #3

    You are right. But it's not the answer of the original question. Imagine a computer in an endless-loop producing numbers for a lotary. Then the possibility is Lt n->∞ 1/n that is 0 - but not impossible!!

    A J 2 Replies Last reply
    0
    • E ensger

      You are right. But it's not the answer of the original question. Imagine a computer in an endless-loop producing numbers for a lotary. Then the possibility is Lt n->∞ 1/n that is 0 - but not impossible!!

      A Offline
      A Offline
      Anand Vivek Srivastava
      wrote on last edited by
      #4

      A computer will not be able to generate an infinite number of numbers. Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe, so the computer will stop working at sometime in the future. Till then a huge amount of numbers would have been produced but not infinite. By definition, infinity can not be generated. Get hold of a high school maths books.

      E D 2 Replies Last reply
      0
      • A Anand Vivek Srivastava

        A computer will not be able to generate an infinite number of numbers. Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe, so the computer will stop working at sometime in the future. Till then a huge amount of numbers would have been produced but not infinite. By definition, infinity can not be generated. Get hold of a high school maths books.

        E Offline
        E Offline
        ensger
        wrote on last edited by
        #5

        The matter is, that the possibility of 0 is not equal to impossible. That's it:-D Yout example with energy and so on - that's no prove. Write down the number of 10 / 3 without something like symbols. You will not suceed - but it exists of course. No computer can do this. And multiplied with 3 it is 10 of course.

        J 1 Reply Last reply
        0
        • A Anand Vivek Srivastava

          A computer will not be able to generate an infinite number of numbers. Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe, so the computer will stop working at sometime in the future. Till then a huge amount of numbers would have been produced but not infinite. By definition, infinity can not be generated. Get hold of a high school maths books.

          D Offline
          D Offline
          Dario Solera
          wrote on last edited by
          #6

          avsrivastava wrote:

          Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe

          :-D You could explain him that a computer can have only a finite amount of memory, and anyway it would need infinite time to generate an infinite sequence of numbers. The amount of energy in the universe is way too complicated for this topic, I think. :)

          ________________________________________________ Tozzi is right: Gaia is getting rid of us. Personal Blog [ITA] - Tech Blog [ENG] Developing ScrewTurn Wiki 1.0 final, now in English, Italian and German.

          E A 2 Replies Last reply
          0
          • D Dario Solera

            avsrivastava wrote:

            Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe

            :-D You could explain him that a computer can have only a finite amount of memory, and anyway it would need infinite time to generate an infinite sequence of numbers. The amount of energy in the universe is way too complicated for this topic, I think. :)

            ________________________________________________ Tozzi is right: Gaia is getting rid of us. Personal Blog [ITA] - Tech Blog [ENG] Developing ScrewTurn Wiki 1.0 final, now in English, Italian and German.

            E Offline
            E Offline
            ensger
            wrote on last edited by
            #7

            I would say, the computer doesn't need on infinite amount of memory, but we need an infinite amount of paper to print the result:-D

            A 1 Reply Last reply
            0
            • E ensger

              Yesterday I questioned, if the possibility of 0 will mean impossible. I dont think so. If you have an infinite number of choices and take one, the possibility is 1 / infinite = 0 but not impossible. All of you said, that 1 / infinite is nearly 0, but not 0. That's astonishing me. So if 10 / 3 = Charly, and Charly * 3 = result, the result is nearly 10, but not 10???

              J Offline
              J Offline
              Jorgen Sigvardsson
              wrote on last edited by
              #8

              There is no number called infinity. You can say stuff like "I wonder what happens with the expression 1/x as x grows towards infinity". Infinity is not a number - you cannot define it, nor can you define any expressions treating infinity as a number. Hence, nobody can say anything about 1/infinity - because it's jibberish. If the expression is 1/x, and x grows towards infinity, then the value of that expression approaches 0. This is basic high school mathematics... 10/3 is also unrepresentable with real numbers (unless you use fancy notations - but then you're not using real numbers, but a modified version). The most accurate way to present that number, is to present it as 10/3, or 3 1/3 if you wish. Pick any number, and I'll counter with an even bigger one. For eternity if I must. ;P

              -- Deciphered from crop circles

              V 1 Reply Last reply
              0
              • E ensger

                You are right. But it's not the answer of the original question. Imagine a computer in an endless-loop producing numbers for a lotary. Then the possibility is Lt n->∞ 1/n that is 0 - but not impossible!!

                J Offline
                J Offline
                Jorgen Sigvardsson
                wrote on last edited by
                #9

                It isn't 0, it approaches 0.

                ensger wrote:

                Imagine a computer in an endless-loop producing numbers for a lotary.

                For 1/x, computers will not be able to maintain enough precision to keep the expression's value above 0. A computer does not have infinite memory... (its CPU registers certainly does not!)

                -- For External Use Only

                1 Reply Last reply
                0
                • E ensger

                  The matter is, that the possibility of 0 is not equal to impossible. That's it:-D Yout example with energy and so on - that's no prove. Write down the number of 10 / 3 without something like symbols. You will not suceed - but it exists of course. No computer can do this. And multiplied with 3 it is 10 of course.

                  J Offline
                  J Offline
                  Jorgen Sigvardsson
                  wrote on last edited by
                  #10

                  ensger wrote:

                  No computer can do this. And multiplied with 3 it is 10 of course.

                  Sure it can. Have you ever used the computer language Scheme? Last time I checked, it handled fractional numbers quite well.

                  -- For External Use Only

                  1 Reply Last reply
                  0
                  • D Dario Solera

                    avsrivastava wrote:

                    Only a finite count of numbers can be generated because there is a finite amount of energy available in the universe

                    :-D You could explain him that a computer can have only a finite amount of memory, and anyway it would need infinite time to generate an infinite sequence of numbers. The amount of energy in the universe is way too complicated for this topic, I think. :)

                    ________________________________________________ Tozzi is right: Gaia is getting rid of us. Personal Blog [ITA] - Tech Blog [ENG] Developing ScrewTurn Wiki 1.0 final, now in English, Italian and German.

                    A Offline
                    A Offline
                    Anand Vivek Srivastava
                    wrote on last edited by
                    #11

                    Oh, I had a feeling that for someone who has problem understanding highschool maths would have problems being convinced that a finite amount of memory cannot be used to achieve it. (and I was right) So, I used the trivial upper bound, which binds everything countable/measurable to finiteness. Now I will just give up.

                    1 Reply Last reply
                    0
                    • E ensger

                      Yesterday I questioned, if the possibility of 0 will mean impossible. I dont think so. If you have an infinite number of choices and take one, the possibility is 1 / infinite = 0 but not impossible. All of you said, that 1 / infinite is nearly 0, but not 0. That's astonishing me. So if 10 / 3 = Charly, and Charly * 3 = result, the result is nearly 10, but not 10???

                      realJSOPR Offline
                      realJSOPR Offline
                      realJSOP
                      wrote on last edited by
                      #12

                      Back in the day, I had to write a Pascal function called "AlmostEqual". I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings. We needed different precisions depending on where we were in the math calculations. My suggestion is to NOT check doubles for equality without doing something along the same lines.

                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                      -----
                      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                      L J 2 Replies Last reply
                      0
                      • E ensger

                        I would say, the computer doesn't need on infinite amount of memory, but we need an infinite amount of paper to print the result:-D

                        A Offline
                        A Offline
                        Anand Vivek Srivastava
                        wrote on last edited by
                        #13

                        You can overcome the problem of infinite paper by the computer showing you a number each time and you could just memorize it. What is the need to print it to paper? :mad:

                        1 Reply Last reply
                        0
                        • J Jorgen Sigvardsson

                          There is no number called infinity. You can say stuff like "I wonder what happens with the expression 1/x as x grows towards infinity". Infinity is not a number - you cannot define it, nor can you define any expressions treating infinity as a number. Hence, nobody can say anything about 1/infinity - because it's jibberish. If the expression is 1/x, and x grows towards infinity, then the value of that expression approaches 0. This is basic high school mathematics... 10/3 is also unrepresentable with real numbers (unless you use fancy notations - but then you're not using real numbers, but a modified version). The most accurate way to present that number, is to present it as 10/3, or 3 1/3 if you wish. Pick any number, and I'll counter with an even bigger one. For eternity if I must. ;P

                          -- Deciphered from crop circles

                          V Offline
                          V Offline
                          Vikram A Punathambekar
                          wrote on last edited by
                          #14

                          Jörgen Sigvardsson wrote:

                          The most accurate way to present that number, is to present it as 10/3, or 3 1/3 if you wish.

                          I learned that it can be written as 3.3. Was my teacher wrong? :suss:

                          Cheers, Vikram.


                          "whoever I am, I'm not other people" - Corinna John.

                          J A 2 Replies Last reply
                          0
                          • realJSOPR realJSOP

                            Back in the day, I had to write a Pascal function called "AlmostEqual". I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings. We needed different precisions depending on where we were in the math calculations. My suggestion is to NOT check doubles for equality without doing something along the same lines.

                            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                            -----
                            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                            L Offline
                            L Offline
                            Lost User
                            wrote on last edited by
                            #15

                            John Simmons / outlaw programmer wrote:

                            I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings.

                            Wow, now that's a hack. Wouldn't it be nicer to do something like this?

                            bool AlmostEqual(double a, double b, int decimalPlaces)
                            {
                            double diff = 0f;
                            for(int i=0; i

                            Or would this be inaccurate again?

                            J 1 Reply Last reply
                            0
                            • V Vikram A Punathambekar

                              Jörgen Sigvardsson wrote:

                              The most accurate way to present that number, is to present it as 10/3, or 3 1/3 if you wish.

                              I learned that it can be written as 3.3. Was my teacher wrong? :suss:

                              Cheers, Vikram.


                              "whoever I am, I'm not other people" - Corinna John.

                              J Offline
                              J Offline
                              Jorgen Sigvardsson
                              wrote on last edited by
                              #16

                              No he wasn't wrong, but it's not a real number either, and not very intuitive for further computations. What is 0.36 times 33? Took you a while eh? What is 4/11 times 33? :)

                              -- Hey, TiVo! Suggest this!

                              A 1 Reply Last reply
                              0
                              • realJSOPR realJSOP

                                Back in the day, I had to write a Pascal function called "AlmostEqual". I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings. We needed different precisions depending on where we were in the math calculations. My suggestion is to NOT check doubles for equality without doing something along the same lines.

                                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                -----
                                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                J Offline
                                J Offline
                                Jorgen Sigvardsson
                                wrote on last edited by
                                #17

                                I often write functions like this:

                                bool FuzzyEqual(double l, double r, double fuzz) {
                                return abs(l - r) < fuzz;
                                }

                                Then I adjust the "fuzz" in accordance to the needed precision.

                                -- Secreted by the Comedy Bee

                                1 Reply Last reply
                                0
                                • E ensger

                                  Yesterday I questioned, if the possibility of 0 will mean impossible. I dont think so. If you have an infinite number of choices and take one, the possibility is 1 / infinite = 0 but not impossible. All of you said, that 1 / infinite is nearly 0, but not 0. That's astonishing me. So if 10 / 3 = Charly, and Charly * 3 = result, the result is nearly 10, but not 10???

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #18

                                  0 is not a number so dividing any number by 0 returns "not a number" in mathematical terms(abbr. NaN). Elaine :rose:

                                  The tigress is here :-D

                                  J 1 Reply Last reply
                                  0
                                  • L Lost User

                                    John Simmons / outlaw programmer wrote:

                                    I passed the values to be checked for "equality", and how many decimal places to check. I converted both values to strings with the appropriate formatting specs, and compared the strings.

                                    Wow, now that's a hack. Wouldn't it be nicer to do something like this?

                                    bool AlmostEqual(double a, double b, int decimalPlaces)
                                    {
                                    double diff = 0f;
                                    for(int i=0; i

                                    Or would this be inaccurate again?

                                    J Offline
                                    J Offline
                                    Jorgen Sigvardsson
                                    wrote on last edited by
                                    #19

                                    That's quite inefficient.. :~

                                    -- Featuring GRATUITOUS ALIEN NUDITY

                                    1 Reply Last reply
                                    0
                                    • L Lost User

                                      0 is not a number so dividing any number by 0 returns "not a number" in mathematical terms(abbr. NaN). Elaine :rose:

                                      The tigress is here :-D

                                      J Offline
                                      J Offline
                                      Jorgen Sigvardsson
                                      wrote on last edited by
                                      #20

                                      0 is not a number? I think you need to revisit and revise your post... ;)

                                      -- For External Use Only

                                      L 1 Reply Last reply
                                      0
                                      • J Jorgen Sigvardsson

                                        0 is not a number? I think you need to revisit and revise your post... ;)

                                        -- For External Use Only

                                        L Offline
                                        L Offline
                                        Lost User
                                        wrote on last edited by
                                        #21

                                        Technically, 0 is lack of a number. The romans didn't have 0 which limited them mathematically (it was actually invented in India and spread to Europe via Arab traders). Elaine :rose:

                                        The tigress is here :-D

                                        J 1 Reply Last reply
                                        0
                                        • L Lost User

                                          Technically, 0 is lack of a number. The romans didn't have 0 which limited them mathematically (it was actually invented in India and spread to Europe via Arab traders). Elaine :rose:

                                          The tigress is here :-D

                                          J Offline
                                          J Offline
                                          Jorgen Sigvardsson
                                          wrote on last edited by
                                          #22

                                          Just because it wasn't discovered until much later, doesn't mean it's not a number[^]. It may not be a natural number per se, but it is a consequence of natural numbers.

                                          -- Pictures[^] from my Japan trip.

                                          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