this post was submitted on 05 Aug 2023
535 points (92.4% liked)

Programmer Humor

20230 readers
2058 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 36 points 2 years ago (1 children)

Makes sense, how would you represent floor(1e42) or ceil(1e120) as integer? It would not fit into 32bit (unsigned) or 31bit (signed) integer. Not even into 64bit integer.

[–] [email protected] 7 points 2 years ago (1 children)

BigInt (yeah, not native everywhere)

[–] [email protected] 3 points 2 years ago

I feel this is worse than double though because it's a library type rather than a basic type but I guess ceil and floor are also library functions unlike toInt