Javaalphacyberranger@lemmy.world to Programmer Humor@programming.dev – 530 points – 1 years ago77Post a CommentPreviewYou are viewing a single commentView all commentsAFAIK most typed languages have this behaviour.Because ints are way smaller. Over a certain value it would always fail.Yea but at those values floating points can't represent fractions anywayExactly. So if cast to int you'd either get an error or 0 for everything above a certain value.
AFAIK most typed languages have this behaviour.Because ints are way smaller. Over a certain value it would always fail.Yea but at those values floating points can't represent fractions anywayExactly. So if cast to int you'd either get an error or 0 for everything above a certain value.
Because ints are way smaller. Over a certain value it would always fail.Yea but at those values floating points can't represent fractions anywayExactly. So if cast to int you'd either get an error or 0 for everything above a certain value.
Yea but at those values floating points can't represent fractions anywayExactly. So if cast to int you'd either get an error or 0 for everything above a certain value.
AFAIK most typed languages have this behaviour.
Because ints are way smaller. Over a certain value it would always fail.
Yea but at those values floating points can't represent fractions anyway
Exactly. So if cast to int you'd either get an error or 0 for everything above a certain value.