A cool Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 26 days ago

Floating point arithmetics

eviltoast.org

message-square
41
link
fedilink
1

Floating point arithmetics

eviltoast.org

orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 26 days ago
message-square
41
link
fedilink
  • marcos@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    26 days ago

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

    • WhiskyTangoFoxtrot@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      26 days ago

      No. They all need to mimic certain numbers.

      • marcos@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        25 days ago

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

        What exactly is being mimicked?

    • calcopiritus@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      25 days ago

      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.

      • marcos@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        25 days ago

        You are proposing that can represent the entire rational set?

        • calcopiritus@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          25 days ago

          Yes that is correct. A BigInt represents the entire integer set.

          Rational numbers are defined by just 2 integers. Therefore, 2 BigInts represent the entire rational set.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 67 users / day
  • 503 users / week
  • 1.36K users / month
  • 1.52K users / 6 months
  • 0 local subscribers
  • 27.2K subscribers
  • 287 Posts
  • 3.38K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
    cake
  • UI: unknown version
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org