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. Following on from yesterday's little puzzler.

Following on from yesterday's little puzzler.

Scheduled Pinned Locked Moved The Lounge
loungecssquestion
46 Posts 23 Posters 5 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.
  • OriginalGriffO OriginalGriff

    It seem that many of us are convinced that -∞ is larger than 0 so I thought I'd try and explain why that isn't the case, even though it does seem to make sense. Let's look at what "greater than" actually means (in all cases I'll use integers but it's exactly the same for floating point numbers). 1 is greater than 0, 2 is greater than both 1 and 0, 3 is greater than 2, 1, and 0, and so on: the general case is "if you add a positive number* to a value, you get a value that is greater than the original": X + n > X where n is any positive number. Similarly, "less than" comes down to: X - n < X where n is any positive number. And it works: 2 > 1 because 1 + 1 == 2; 3 > 1 because 1 + 2 == 3; ... 1 < 2 because 2 - 1 == 1; 1 < 3 because 3 - 2 == 1; ... And we can use "greater than" and "Less than" for find maxima and minima for a set of numbers. We can find the smallest positive number by taking any positive number as a starting point and repeatedly subtracting 1 until we reach a non-positive value (which will be zero): 1 was the last, so it's the smallest positive number. Everyone here has agreed on that! But when we look for the largest negative number it seems that some people are mistaking the absolute magnitude of a value for the value itself, and saying that the largest negative number is -∞ But that's not the case: just as numbers get smaller as you approach 0 from the positive side, they don't start getting bigger again as you move away into the negative side: 1 > 0; 1 > -1; 1 > -2 Slide that sideways and it's clearer for negative numbers: 0 > -1; 0 > -2; 0 > -3 -1 > -2; -1 > -3; -1 > -4 So to find the largest negative number, we start with any negative number as a starting point and repeatedly adding 1 until we reach a non-negative value (which will be zero): -1 was the last, so that's the largest negative number. Make sense? * Zero is neither positive nor negative because the definition of both those terms stems from the direction of X from 0.

    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

    J Offline
    J Offline
    jmaida
    wrote on last edited by
    #22

    check out this puzzlement Missing dollar riddle - Wikipedia[^]

    "A little time, a little trouble, your better day" Badfinger

    A 1 Reply Last reply
    0
    • M Marc Clifton

      And again I balk. "greater than" and "largest" are not synonymous for me, and "largest", when speaking of negative numbers, is non-sensical because negative things don't have "largeness." :rolleyes:

      Latest Articles:
      A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #23

      So ... you can't have a "large student debt"? :laugh:

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      A 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        It seem that many of us are convinced that -∞ is larger than 0 so I thought I'd try and explain why that isn't the case, even though it does seem to make sense. Let's look at what "greater than" actually means (in all cases I'll use integers but it's exactly the same for floating point numbers). 1 is greater than 0, 2 is greater than both 1 and 0, 3 is greater than 2, 1, and 0, and so on: the general case is "if you add a positive number* to a value, you get a value that is greater than the original": X + n > X where n is any positive number. Similarly, "less than" comes down to: X - n < X where n is any positive number. And it works: 2 > 1 because 1 + 1 == 2; 3 > 1 because 1 + 2 == 3; ... 1 < 2 because 2 - 1 == 1; 1 < 3 because 3 - 2 == 1; ... And we can use "greater than" and "Less than" for find maxima and minima for a set of numbers. We can find the smallest positive number by taking any positive number as a starting point and repeatedly subtracting 1 until we reach a non-positive value (which will be zero): 1 was the last, so it's the smallest positive number. Everyone here has agreed on that! But when we look for the largest negative number it seems that some people are mistaking the absolute magnitude of a value for the value itself, and saying that the largest negative number is -∞ But that's not the case: just as numbers get smaller as you approach 0 from the positive side, they don't start getting bigger again as you move away into the negative side: 1 > 0; 1 > -1; 1 > -2 Slide that sideways and it's clearer for negative numbers: 0 > -1; 0 > -2; 0 > -3 -1 > -2; -1 > -3; -1 > -4 So to find the largest negative number, we start with any negative number as a starting point and repeatedly adding 1 until we reach a non-negative value (which will be zero): -1 was the last, so that's the largest negative number. Make sense? * Zero is neither positive nor negative because the definition of both those terms stems from the direction of X from 0.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #24

        :thumbsup: Bringing QA experience to the Lounge!

        "In testa che avete, Signor di Ceprano?" -- Rigoletto

        1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          It seem that many of us are convinced that -∞ is larger than 0 so I thought I'd try and explain why that isn't the case, even though it does seem to make sense. Let's look at what "greater than" actually means (in all cases I'll use integers but it's exactly the same for floating point numbers). 1 is greater than 0, 2 is greater than both 1 and 0, 3 is greater than 2, 1, and 0, and so on: the general case is "if you add a positive number* to a value, you get a value that is greater than the original": X + n > X where n is any positive number. Similarly, "less than" comes down to: X - n < X where n is any positive number. And it works: 2 > 1 because 1 + 1 == 2; 3 > 1 because 1 + 2 == 3; ... 1 < 2 because 2 - 1 == 1; 1 < 3 because 3 - 2 == 1; ... And we can use "greater than" and "Less than" for find maxima and minima for a set of numbers. We can find the smallest positive number by taking any positive number as a starting point and repeatedly subtracting 1 until we reach a non-positive value (which will be zero): 1 was the last, so it's the smallest positive number. Everyone here has agreed on that! But when we look for the largest negative number it seems that some people are mistaking the absolute magnitude of a value for the value itself, and saying that the largest negative number is -∞ But that's not the case: just as numbers get smaller as you approach 0 from the positive side, they don't start getting bigger again as you move away into the negative side: 1 > 0; 1 > -1; 1 > -2 Slide that sideways and it's clearer for negative numbers: 0 > -1; 0 > -2; 0 > -3 -1 > -2; -1 > -3; -1 > -4 So to find the largest negative number, we start with any negative number as a starting point and repeatedly adding 1 until we reach a non-negative value (which will be zero): -1 was the last, so that's the largest negative number. Make sense? * Zero is neither positive nor negative because the definition of both those terms stems from the direction of X from 0.

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          M Offline
          M Offline
          Member 10652083
          wrote on last edited by
          #25

          Maybe - if you change "non-positive value" in your last sentence to "non-negative value".

          OriginalGriffO 1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            It seem that many of us are convinced that -∞ is larger than 0 so I thought I'd try and explain why that isn't the case, even though it does seem to make sense. Let's look at what "greater than" actually means (in all cases I'll use integers but it's exactly the same for floating point numbers). 1 is greater than 0, 2 is greater than both 1 and 0, 3 is greater than 2, 1, and 0, and so on: the general case is "if you add a positive number* to a value, you get a value that is greater than the original": X + n > X where n is any positive number. Similarly, "less than" comes down to: X - n < X where n is any positive number. And it works: 2 > 1 because 1 + 1 == 2; 3 > 1 because 1 + 2 == 3; ... 1 < 2 because 2 - 1 == 1; 1 < 3 because 3 - 2 == 1; ... And we can use "greater than" and "Less than" for find maxima and minima for a set of numbers. We can find the smallest positive number by taking any positive number as a starting point and repeatedly subtracting 1 until we reach a non-positive value (which will be zero): 1 was the last, so it's the smallest positive number. Everyone here has agreed on that! But when we look for the largest negative number it seems that some people are mistaking the absolute magnitude of a value for the value itself, and saying that the largest negative number is -∞ But that's not the case: just as numbers get smaller as you approach 0 from the positive side, they don't start getting bigger again as you move away into the negative side: 1 > 0; 1 > -1; 1 > -2 Slide that sideways and it's clearer for negative numbers: 0 > -1; 0 > -2; 0 > -3 -1 > -2; -1 > -3; -1 > -4 So to find the largest negative number, we start with any negative number as a starting point and repeatedly adding 1 until we reach a non-negative value (which will be zero): -1 was the last, so that's the largest negative number. Make sense? * Zero is neither positive nor negative because the definition of both those terms stems from the direction of X from 0.

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            H Offline
            H Offline
            haughtonomous
            wrote on last edited by
            #26

            I'm not sure about your explanation, but I sense you are making the mistake I referred to yesterday, viz. basing your argument on the way number theory is implemented in the computer languages with which you are familiar, rather than on formal number theory itself. To answer the question we need the advice of pure mathemeticians on how magnitude of negative numbers is defined. How computers deal with it is clouded, as usual, by practicalities and compromise. However I doubt if there are any pure mathematicians lurking in this forum!

            1 Reply Last reply
            0
            • M Member 10652083

              Maybe - if you change "non-positive value" in your last sentence to "non-negative value".

              OriginalGriffO Offline
              OriginalGriffO Offline
              OriginalGriff
              wrote on last edited by
              #27

              Oops! Fixed :thumbsup:

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

              1 Reply Last reply
              0
              • Mircea NeacsuM Mircea Neacsu

                How about -π: it has lots of figures and a minus sign :laugh:

                Mircea

                A Offline
                A Offline
                Alister Morton
                wrote on last edited by
                #28

                e^iπ is the largest negative integer, I'd say.

                G 1 Reply Last reply
                0
                • A Alister Morton

                  e^iπ is the largest negative integer, I'd say.

                  G Offline
                  G Offline
                  Gary Wheeler
                  wrote on last edited by
                  #29

                  e_i_π FTFY.

                  Software Zen: delete this;

                  A 1 Reply Last reply
                  0
                  • G Gary Wheeler

                    e_i_π FTFY.

                    Software Zen: delete this;

                    A Offline
                    A Offline
                    Alister Morton
                    wrote on last edited by
                    #30

                    Eye thang ewe. ;-)

                    G 1 Reply Last reply
                    0
                    • A Alister Morton

                      Eye thang ewe. ;-)

                      G Offline
                      G Offline
                      Gary Wheeler
                      wrote on last edited by
                      #31

                      You're welcome... I think. Kind of sounds like an indecent proposal to a sheep, but to quote the immortal Marty Feldman, "Suit yourself; I'm easy."

                      Software Zen: delete this;

                      1 Reply Last reply
                      0
                      • J jschell

                        Paul6124 wrote:

                        on to infinity equals minus 1/12

                        As it says "only equals -1/12 because the mathematicians redefined the equal sign." You can also prove other things by ignoring and/or redefining terms and assumptions in mathematics. For example it is generally accepted that you cannot prove in Euclidean geometry that parallel lines do not intersect. However you can prove that if you assume that a right triangle has a 90 degree angle. So trade one assumption for another. So in terms of the prior post one can redefine the problem by asserting that negatives can be bigger if the absolute value is bigger. Thus redefining what 'bigger' means in terms of the standard for Number Theory.

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

                        So what you’re saying is, mathematical proofs are like statistics, you can make them suit your narrative

                        J 1 Reply Last reply
                        0
                        • J jschell

                          Paul6124 wrote:

                          on to infinity equals minus 1/12

                          As it says "only equals -1/12 because the mathematicians redefined the equal sign." You can also prove other things by ignoring and/or redefining terms and assumptions in mathematics. For example it is generally accepted that you cannot prove in Euclidean geometry that parallel lines do not intersect. However you can prove that if you assume that a right triangle has a 90 degree angle. So trade one assumption for another. So in terms of the prior post one can redefine the problem by asserting that negatives can be bigger if the absolute value is bigger. Thus redefining what 'bigger' means in terms of the standard for Number Theory.

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

                          You may be interested in this: The Return of -1/12 - Numberphile - YouTube[^]

                          1 Reply Last reply
                          0
                          • N Nelek

                            In my case (non native english speaker) "large" is for me more associated with size, not value. That's why I would usually think first on the biggest module in negative, meaning -∞. But... as I have had a lot of such tricky questions, I tend to wait a second, put back the obvious answer and pay a lot of more attention to the wording while activating the paranoic mode. So at the end I found the right solution.

                            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.

                            M Offline
                            M Offline
                            Matthew Barnett
                            wrote on last edited by
                            #34

                            I (native speaker) would agree there. To me, there's a difference between "greater" and "larger", and between "less" and "smaller". Greater/less include the sign whereas larger/smaller refer to the absolute magnitude.

                            1 Reply Last reply
                            0
                            • OriginalGriffO OriginalGriff

                              I can't explain that, it involves division and I can't do that. :-D

                              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                              A Offline
                              A Offline
                              Andre Oosthuizen
                              wrote on last edited by
                              #35

                              The becomes Teh...

                              1 Reply Last reply
                              0
                              • P PIEBALDconsult

                                Mount Everest isn't high at all; it's at ground level.

                                A Offline
                                A Offline
                                Andre Oosthuizen
                                wrote on last edited by
                                #36

                                Perfect, it might have the highest/tallest peak, still at ground level... :-D

                                1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  So ... you can't have a "large student debt"? :laugh:

                                  "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                                  A Offline
                                  A Offline
                                  Andre Oosthuizen
                                  wrote on last edited by
                                  #37

                                  Large or smaller is a perception as it might be greater than the next or it might be less tahn the next, philosophy kicking in now sorry... :-D

                                  1 Reply Last reply
                                  0
                                  • J jmaida

                                    check out this puzzlement Missing dollar riddle - Wikipedia[^]

                                    "A little time, a little trouble, your better day" Badfinger

                                    A Offline
                                    A Offline
                                    Andre Oosthuizen
                                    wrote on last edited by
                                    #38

                                    Very interesting riddle, almost got a brain freeze :-D If you read carefully, the answer to get to 30 is quite obvious, unfortunately our brains are not wired that way.. :((

                                    J 1 Reply Last reply
                                    0
                                    • OriginalGriffO OriginalGriff

                                      It seem that many of us are convinced that -∞ is larger than 0 so I thought I'd try and explain why that isn't the case, even though it does seem to make sense. Let's look at what "greater than" actually means (in all cases I'll use integers but it's exactly the same for floating point numbers). 1 is greater than 0, 2 is greater than both 1 and 0, 3 is greater than 2, 1, and 0, and so on: the general case is "if you add a positive number* to a value, you get a value that is greater than the original": X + n > X where n is any positive number. Similarly, "less than" comes down to: X - n < X where n is any positive number. And it works: 2 > 1 because 1 + 1 == 2; 3 > 1 because 1 + 2 == 3; ... 1 < 2 because 2 - 1 == 1; 1 < 3 because 3 - 2 == 1; ... And we can use "greater than" and "Less than" for find maxima and minima for a set of numbers. We can find the smallest positive number by taking any positive number as a starting point and repeatedly subtracting 1 until we reach a non-positive value (which will be zero): 1 was the last, so it's the smallest positive number. Everyone here has agreed on that! But when we look for the largest negative number it seems that some people are mistaking the absolute magnitude of a value for the value itself, and saying that the largest negative number is -∞ But that's not the case: just as numbers get smaller as you approach 0 from the positive side, they don't start getting bigger again as you move away into the negative side: 1 > 0; 1 > -1; 1 > -2 Slide that sideways and it's clearer for negative numbers: 0 > -1; 0 > -2; 0 > -3 -1 > -2; -1 > -3; -1 > -4 So to find the largest negative number, we start with any negative number as a starting point and repeatedly adding 1 until we reach a non-negative value (which will be zero): -1 was the last, so that's the largest negative number. Make sense? * Zero is neither positive nor negative because the definition of both those terms stems from the direction of X from 0.

                                      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                      A Offline
                                      A Offline
                                      Andre Oosthuizen
                                      wrote on last edited by
                                      #39

                                      Just as a side winder regarding the math's behind this, why is it that binary only runs on 0 (zero) and 1's with 0 being the neutral number then and not why use -1 0 0 1 1 0 -1 as binary. Maybe I should just go Google first as this is above my paygrade... ? And so I found this also relating to largest and smaller compared to bigger and less, sorry - Binary Negative Numbers![^]

                                      1 Reply Last reply
                                      0
                                      • L Lost User

                                        So what you’re saying is, mathematical proofs are like statistics, you can make them suit your narrative

                                        J Offline
                                        J Offline
                                        jschell
                                        wrote on last edited by
                                        #40

                                        Paul6124 wrote:

                                        you can make them suit your narrative

                                        lol - yes. The posted link provides a complex example but people have been proving things for a long time by ignoring what divide by zero means. (Long time in my case means I saw such a proof in grade school which meant it existed quite some time before that even.)

                                        1 Reply Last reply
                                        0
                                        • OriginalGriffO OriginalGriff

                                          It seem that many of us are convinced that -∞ is larger than 0 so I thought I'd try and explain why that isn't the case, even though it does seem to make sense. Let's look at what "greater than" actually means (in all cases I'll use integers but it's exactly the same for floating point numbers). 1 is greater than 0, 2 is greater than both 1 and 0, 3 is greater than 2, 1, and 0, and so on: the general case is "if you add a positive number* to a value, you get a value that is greater than the original": X + n > X where n is any positive number. Similarly, "less than" comes down to: X - n < X where n is any positive number. And it works: 2 > 1 because 1 + 1 == 2; 3 > 1 because 1 + 2 == 3; ... 1 < 2 because 2 - 1 == 1; 1 < 3 because 3 - 2 == 1; ... And we can use "greater than" and "Less than" for find maxima and minima for a set of numbers. We can find the smallest positive number by taking any positive number as a starting point and repeatedly subtracting 1 until we reach a non-positive value (which will be zero): 1 was the last, so it's the smallest positive number. Everyone here has agreed on that! But when we look for the largest negative number it seems that some people are mistaking the absolute magnitude of a value for the value itself, and saying that the largest negative number is -∞ But that's not the case: just as numbers get smaller as you approach 0 from the positive side, they don't start getting bigger again as you move away into the negative side: 1 > 0; 1 > -1; 1 > -2 Slide that sideways and it's clearer for negative numbers: 0 > -1; 0 > -2; 0 > -3 -1 > -2; -1 > -3; -1 > -4 So to find the largest negative number, we start with any negative number as a starting point and repeatedly adding 1 until we reach a non-negative value (which will be zero): -1 was the last, so that's the largest negative number. Make sense? * Zero is neither positive nor negative because the definition of both those terms stems from the direction of X from 0.

                                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                          M Offline
                                          M Offline
                                          Member 10662223
                                          wrote on last edited by
                                          #41

                                          oh no this has prompted me to post for the first time ever... > the general case is "if you add a positive number to a value, you get a value that is greater than the original" That is your postulate, not a fact or proof. -1 is greater than -2 only if you assume this is true. I propose another: To divide a quantity or object in half is to produce two halves that are each smaller than the original whole. Divide a number in half, the result is the smaller number. > Let's look at what "greater than" actually means... We all know language is ambiguous. It could actually mean many different things. Of course no one is arguing that (-1 > -2) doesn't evaluate to true in your programming language of choice* :) That's just pragmatic. *except maybe c++ in some cases...

                                          OriginalGriffO 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