• ramble81@lemm.ee
    link
    fedilink
    arrow-up
    13
    arrow-down
    2
    ·
    6 months ago

    Because at the end of the day everything gets simplified to a 1 or a 0. You could store a fraction as an “object” but at some point it needs to be turned into a number to work with. That’s where floating points come into play.

    • Knock_Knock_Lemmy_In@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      6 months ago

      There is already a pair of objects we can use to store fractions. The ratio of two integers.

      Irrational numbers is when floating points come into play.