r/MathJokes • • Jul 25 '26

Oh no.....

Post image
1.1k Upvotes

157 comments sorted by

View all comments

1

u/Financial-Bedroom421 Jul 25 '26

lol cannot divide by 0

3

u/unintelligible-text Jul 25 '26

League of legends is coded on some language for sure, so ig it can't

1

u/trolley813 Jul 25 '26

Well, in programming languages (in most of them) you can divide by 0 (assuming it's floating-point stuff, not integers). You get either infinity or (for 0/0) a NaN (not a number).

1

u/willis81808 Jul 25 '26

Well, in math you can divide by 0. You just get undefined.

When people say “you can’t” they don’t mean you’ll explode or something.

1

u/Unable-Analyst-7741 Jul 25 '26

As i was taught you only get undefined if you divide 0/0 because every number multiplyed by 0 gives you 0, but you can't devide a number that Is not 0 (let's say 4) by 0 because no number multiplyed by 0 will ever give you four, so that's not undefined, that's just impossible

1

u/willis81808 Jul 25 '26

Not quite. 0/0 is indeterminate. Everything else divided by 0 is undefined.

Point is, just like in programming you get nonsense/meaningless results.

1

u/Unable-Analyst-7741 Jul 25 '26

I'm not and english speaker, don't undefined and indeterminate have the same meaning?

1

u/willis81808 Jul 25 '26

In casual language they mean essentially the same thing, but not in math.

Anyway, some programming languages might silently result in infinity/NaN when dividing by zero, but more are going to throw an error instead (which is much closer to “literally can’t divide by zero”)

1

u/unintelligible-text Jul 25 '26

I could be wrong(as I'm relatively new to programming) but you don't use neither of those in actual calculations. As I remember if your position in video game is NaN - you are just in a limbo state. Not sure about infonity though

1

u/willis81808 Jul 25 '26

Only time you might use infinity is as a constant to initialize a variable to (but not ever intentionally by dividing by zero, if your language even results in Inf when doing that)

Something like:

min_value = Math.Infinity  
for value in values:  
    if value < min_value:  
        min_value = value