1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Seems like I won't have long

Discussion in 'Something Else' started by HappyTauren, Feb 5, 2018.

  1. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    10,233
    Resources:
    1
    Maps:
    1
    Resources:
    1
    By the way why does the - disappear when multiplying two negative numbers? I mean you basically have two times three less but you get 9 :D?
    Yeah, you're right because -3-3=-9. So --3 means -3x-2 but ---3=/=-9 and actually -3x-2-3=6-3=3?
     
  2. fladdermasken

    fladdermasken

    Joined:
    Dec 27, 2006
    Messages:
    2,432
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    This thread is now about elementary arithmetic.

    Code (vJASS):

    Addition

    (-a) + (-b) = -(a+b)
    (-a) +   b  =   b-a
      a  + (-b) =   a-b

    Subtraction

    (-a) - (-b) =   b-a
      a  - (-b) =   a+b
    (-a) -   b  = -(a+b)

    Multiplication

    (-a) * (-b) =  ab
    (-a) *   b  = -ab
      a  * (-b) = -ab

    Division

    (-a) / (-b) =   a/b
    (-a) /   b  = -(a/b)
      a  / (-b) = -(a/b)

    Discuss.
     
  3. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    10,233
    Resources:
    1
    Maps:
    1
    Resources:
    1
    also when dividing. Why?
     
  4. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,165
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Defined, so laws make sense.
     
  5. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    10,233
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Meh, I want a mathematical/logical explanation not that that's how we wanted it to be.
     
  6. fladdermasken

    fladdermasken

    Joined:
    Dec 27, 2006
    Messages:
    2,432
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    It's defined that way to keep the distributive property of multiplication for negative numbers from breaking.

    A negative number is just its positive equivalent multiplied by -1.

    e.g.
    (-3)*(-4) = (-1)*3*(-1)*4 = (-1)*(-1)*3*4


    The distributive property says that a(b+c) = ab + ac.

    So, basically if we claim some other convention, e.g. that
    (-1)*(-1) = (-1)
    ,

    then
    (-1)(1 + -1) = (-1)(1) + (-1)(-1)
    .

    Or, rewritten
    (-1)(0) = (-1)(1) + (-1)(-1)
    .

    If
    (-1)(-1) = -1
    then we can also write
    (-1)(0) = -1 + -1
    .

    Or, basically,

    0 = 2
    .

    It turns out distribution would similarly break for any other convention than (-1)(-1) = 1.

    Those are basically the same thing at heart.
     
    Last edited: Feb 6, 2018
  7. HappyTauren

    HappyTauren

    Joined:
    Nov 3, 2006
    Messages:
    8,414
    Resources:
    87
    Models:
    61
    Icons:
    23
    Packs:
    1
    Tutorials:
    2
    Resources:
    87
    Multiplying by a negative number changes the sign. Multiplying by a negative number twice changes the sign twice. There are only two signs.

    5 * -1 * -1 = 5

    So why does it change the sign? Because multiplication is loop'd addition.

    5 * 1 = 1 + 1 + 1 + 1 + 1 = 5

    5 * -1 = (-1) + (-1) + (-1) + (-1) + (-1) = -5

    -5 * -1 = 5 * -1 * -1 conclude for yourself
     
  8. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,165
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    That doesn't really explain it.
     
  9. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,308
    Resources:
    0
    Resources:
    0
    Looks like basic school math cured HT!
    We finally found the cure to cancer everyone!
     
  10. HappyTauren

    HappyTauren

    Joined:
    Nov 3, 2006
    Messages:
    8,414
    Resources:
    87
    Models:
    61
    Icons:
    23
    Packs:
    1
    Tutorials:
    2
    Resources:
    87
    if someone really wants a good explanation on why addition and multiplication work the way they do,, I'd need to go into groups rings and fields and that would take a while and I actually have a fever right now so I don't feel like it.
     
  11. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    10,233
    Resources:
    1
    Maps:
    1
    Resources:
    1
    So, what's wrong with -1x1=-1 and -1x-1=-1 and 1x1=1? And -1x0=0 and 1x0=0?
     
  12. fladdermasken

    fladdermasken

    Joined:
    Dec 27, 2006
    Messages:
    2,432
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    Nothing, that is how we define it.

    See my post above. I show what happens when we assume this.

    Nothing, these are also defined like that already.
     
  13. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    10,233
    Resources:
    1
    Maps:
    1
    Resources:
    1
    OK. It makes sense that -1x (1+-1)=0 and 1x (1-1)=0. Guess that's just it, a logical thing, not necessarily a universal law.

    EDIT: but the logic sucks when multiplying less gets you more.
    Imagine how that would be in reality: from less than nothing into something, like super God.
     
    Last edited: Feb 6, 2018
  14. fladdermasken

    fladdermasken

    Joined:
    Dec 27, 2006
    Messages:
    2,432
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    The scope of mathematics is a debate in itself. There are many views and philosophies among mathematicians, and no real reconciliation to speak of.

    There are many ways you can try and visualize it, e.g. paying your bills.

    Let's say you get three bills and they're all $20 each. After paying, you'd have 3*(-20) = -$60 more, i.e. $60 less.

    Now let's say you sent out three bills instead. We can say you've gotten three negative bills. Then you'd have (-3)*(-20) = $60 more than you started with.
     
  15. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    10,233
    Resources:
    1
    Maps:
    1
    Resources:
    1
    That's just looking at it from another perspective so to speak, as looking at something negative from a positive perspective. For every force there is an opposing one. So, I still get -60 and you get the 60. The -60 is lost in the calculation.
    But if I give you 3 apples, that gets you 3 and me 0. Basically -3 is inexistent as -3=/=0.
    Thus the -number is just the action in the end and not the result.
     
  16. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,308
    Resources:
    0
    Resources:
    0
    If you give me 3 apples, that gives me 3 apples and gives you -3 apples actually.
     
  17. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    10,233
    Resources:
    1
    Maps:
    1
    Resources:
    1
    But the result is 0 for me and 3 for you. It's a -3(me)+/-0 (you).
     
  18. HappyTauren

    HappyTauren

    Joined:
    Nov 3, 2006
    Messages:
    8,414
    Resources:
    87
    Models:
    61
    Icons:
    23
    Packs:
    1
    Tutorials:
    2
    Resources:
    87
    what are you confusing here

    you: 0 + 3 = 3
    him: 3 - 3 = 0
     
  19. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    10,233
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I don't have 0 from the start. That's the result. I have 3 and then get 0.
    He has 0 and gets 3 which means my 3 turns to -3 and back to 3 on him.
     
  20. HappyTauren

    HappyTauren

    Joined:
    Nov 3, 2006
    Messages:
    8,414
    Resources:
    87
    Models:
    61
    Icons:
    23
    Packs:
    1
    Tutorials:
    2
    Resources:
    87
    I mixed up "you" and "him", but it's the same thing.

    No, your 3 doesn't turn to -3. Your 3 turns to 0 by adding -3 to 3.

    Wait, why are we discussing this?