@cockswain This is where you can have some fun actually. Its all a matter of definitions. Any definition works as long as the rules don’t create contradictions.
I’ve forgotten the details actually, but I think its usually defined as:
if x > 0, inf * x = inf
if x = 0, inf * x = 0
if x < 0, inf * x = neg inf
And it gets swapped if you do neg inf * x
This makes sense if you view “x * y” as “get x bags of y jelly beans each.” Even if you an an unlimited number of empty bags, you ain’t got no jelly beans. Also, if you don’t have any of these infinitely large jelly beans, you still got nothing. (Feel free to replace jelly beans with anything you want).
But of course, having two bags of infinite jelly beans is the same as having one such bag. You’ll never finish one, so the second doesn’t help. Hence:
inf * 1 = inf * 2
Or
inf / 2 = inf
In most of these systems, you can’t divide by 0. Or, to put it mathematically “zero has no multiplicative inverse.” (The multiplicative inverse is just the reciprocal in this case, but in other systems it can be something else, like the inverse of a matrix).
Now here’s the big question. And to this, I don’t know the answer. I can work it out to do anything I want actually:
What is inf + neg inf?
I can get this to come out to inf, any number, or neg inf. Well, sort of… now we need to get more specific about what infinity means.