81

Float strikes again πŸ™„

Comments
  • 3
    That's floatiest things I've seen today😬
  • 1
    "You'll float too!"
  • 1
    Isn't that double? Most floats only have 5 digets.
  • 1
    @LinusCDE That's probably just because they're usually rounded to a few decimal places to avoid ridiculously long numbers
  • 0
    @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.
  • 2
    @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 :)
  • 0
    @Ezard So they allow fractions??
  • 1
    Why did they even use float for that?
  • 1
    @Gianlu For what I can see, they used the range 0.0 to 1.0 for 0% to 100%. Pretty common in programming.
Add Comment