• 0 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle






  • kionay@lemmy.world
    cake
    tomemes@lemmy.worldAmiright?
    link
    fedilink
    English
    arrow-up
    9
    ·
    8 months ago

    ECMAScript spec says Math.random must be less than 1. I was about to stop there, but a thought occurred to me: could the multiply with a float make a number large enough to floor to a different value for large enough values? 🤔

    I imagine it’d have to be a ridiculously large number to amount enough floating point imprecision to matter, if so.