alphacyberranger to Programmer [email protected]English • 1 year agoJavalemmy.worldmessage-square77fedilinkarrow-up1583
arrow-up1535imageJavalemmy.worldalphacyberranger to Programmer [email protected]English • 1 year agomessage-square77fedilink
minus-square@[email protected]linkfedilink4•1 year agoBecause ints are way smaller. Over a certain value it would always fail.
minus-squarelarvydelinkfedilink1•1 year agoYea but at those values floating points can’t represent fractions anyway
minus-square@[email protected]linkfedilink1•1 year agoExactly. 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 anyway
Exactly. So if cast to int you’d either get an error or 0 for everything above a certain value.