you are viewing a single comment's thread
view the rest of the comments
[+] -6 points 1 year ago (12 children)

It's not "mimicking" a fraction. It is a fraction.

It's also the most compact fraction representation around.

  • source
  • hideshow 12 child comments
  • [–] 19 points 1 year ago (11 children)

    Show how 1/3 can be precisely represented in floating point.

  • source
  • parent
  • hideshow 11 child comments
  • [–] 35 points 1 year ago (2 children)

    fl_numerator = 1

    fl_denominator = 3

    And division is a "stretch goal" once we get funding.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 year ago (6 children)

    Do you have a computer type that can represent the entire rational set?

  • source
  • parent
  • hideshow 6 child comments
  • [–] 4 points 1 year ago (2 children)

    Yes. Have a structure with 2 BigInts. Treat one as the numerator. The other as denominators.

    It might not be efficient or fast. But it is possible.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 year ago (2 children)

    No. They all need to mimic certain numbers.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 year ago (1 child)

    So, you have a notation that can represent the entire rational set?

    What exactly is being mimicked?

  • source
  • parent
  • hideshow 1 child comment