# Seems like I won't have long

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

### Map Reviewer

Joined:
Jun 4, 2009
Messages:
10,257
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 ?
Yeah, you're right because -3-3=-9. So --3 means -3x-2 but ---3=/=-9 and actually -3x-2-3=6-3=3?

Joined:
Dec 27, 2006
Messages:
2,432
Resources:
3
Tutorials:
3
Resources:
3

Code (vJASS):

(-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.

### Map Reviewer

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

4. ### 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.

### Map Reviewer

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

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

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

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

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

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.

### Map Reviewer

Joined:
Jun 4, 2009
Messages:
10,257
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?

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.

### Map Reviewer

Joined:
Jun 4, 2009
Messages:
10,257
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

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.

### Map Reviewer

Joined:
Jun 4, 2009
Messages:
10,257
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

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.

### Map Reviewer

Joined:
Jun 4, 2009
Messages:
10,257
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

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

### Map Reviewer

Joined:
Jun 4, 2009
Messages:
10,257
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

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?