Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Ezard19607y@LinusCDE That's probably just because they're usually rounded to a few decimal places to avoid ridiculously long numbers
-
@Ezard In Java the float it a 32-Bit number and has five digets.
In most high level languages (Python, JS) it is true for sure because they handle numbers vastly different than traditional languages. -
Ezard19607y@LinusCDE Actually the smallest (as in closest to zero) Java float you can get is +/- 1.4 x10^-45, which is a lot more than 5 digits :)
-
@Gianlu For what I can see, they used the range 0.0 to 1.0 for 0% to 100%. Pretty common in programming.
Related Rants
Float strikes again π
random
4
float
bt
4.1