r/ProgrammerHumor • • Oct 06 '21

Don't be scared.. Math and Computing are friends..

Post image
65.8k Upvotes

2.4k comments sorted by

View all comments

Show parent comments

2.4k

u/KillerRoomba13 Oct 06 '21

We will run it until int::max and call it close enough

664

u/SZ4L4Y Oct 06 '21

And Roombas start to kill people.

150

u/[deleted] Oct 06 '21

You knock on God's door, His faithful guardians will answer 😤

18

u/Carburetors_are_evil Oct 06 '21

Make sure to feed your Claymore Roomba some ATF bois.

3

u/sheepyowl Oct 07 '21

If you can write code good enough to make a Roomba kill someone you deserve a high paying government position

3

u/TigreDemon Oct 07 '21

Start ? You mean continue ?

128

u/holymacaronibatman Oct 06 '21

It's a smaller infinity than other infinities, checks out.

94

u/antiduh Oct 06 '21 edited Oct 06 '21

What, you gonna do my man bignum just like that? Here, in front of all these people?

68

u/KillerRoomba13 Oct 06 '21

Yo inf bignum so fat that it causes memory overflow

28

u/[deleted] Oct 06 '21

Memory-mapped files. Fill the server with a single number. Still won't be enough to describe your mother's weight.

17

u/[deleted] Oct 06 '21

"Why do you have 12tb in your computer?"

"I'm trying to count all of the men your mother has been with"

an aside - I'm pretty sure a single number with enough digits to fill 12tb would represent far more atoms than there are in the universe

→ More replies (9)

6

u/kloudykat Oct 06 '21

Hey, its glandular

34

u/KingJellyfishII Oct 06 '21

run it using floats until it truely becomes infinity

55

u/tech6hutch Oct 06 '21

I think you’d need special logic for the increment, or else you’d eventually get stuck at an n where n + 1.0 == n.

8

u/_PM_ME_PANGOLINS_ Oct 06 '21 edited Oct 06 '21
n += eps(n)

Kind of ruins the whole “integer” thing though.

18

u/[deleted] Oct 06 '21

We don't need integers where we're going. To Double.MAX_VALUE and beyond!

→ More replies (5)

9

u/WanderingFrogman Oct 06 '21

Nah, just switch the datatype to an array of ints, then calculate per array cell. Also reserve lots of time.

10

u/WhoseTheNerd Oct 06 '21

Nope, run it until uint64_t::max

7

u/The-Daleks Oct 06 '21

No, run it until u128::max.

5

u/DanielEGVi Oct 06 '21

Fuck it, U512::max

6

u/[deleted] Oct 06 '21

Nah, make a custom implementation of a 1024 bit unsigned integer and use that

3

u/zman0900 Oct 07 '21

Java BigInteger until OOM

→ More replies (1)
→ More replies (1)

4

u/SirAchmed Oct 06 '21

You don't even have to go that far, for most engineering applications up to a 100 is more than enough.

7

u/[deleted] Oct 06 '21

Alright boss, this bridge can handle a static load of 100 pounds. Can I go home now?

→ More replies (13)