536
Java (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] korstmos@kbin.social 50 points 1 year ago

Doubles have a much higher max value than ints, so if the method were to convert all doubles to ints they would not work for double values above 2^31-1.

(It would work, but any value over 2^31-1 passed to such a function would get clamped to 2^31-1)

[-] affiliate@lemmy.world 2 points 1 year ago
[-] korstmos@kbin.social 2 points 1 year ago
load more comments (3 replies)
load more comments (7 replies)
this post was submitted on 05 Aug 2023
536 points (92.4% liked)

Programmer Humor

19187 readers
1094 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 1 year ago
MODERATORS