DIGITALFALL
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 20 hours ago

Floating point arithmetics

eviltoast.org

message-square
42
link
fedilink
677

Floating point arithmetics

eviltoast.org

orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 20 hours ago
message-square
42
link
fedilink
  • WhiskyTangoFoxtrot@lemmy.world
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    20 hours ago

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

    • BigMikeInAustin@lemmy.world
      link
      fedilink
      English
      arrow-up
      35
      ·
      19 hours ago

      fl_numerator = 1

      fl_denominator = 3

      And division is a “stretch goal” once we get funding.

      • Gork@sopuli.xyz
        link
        fedilink
        arrow-up
        3
        ·
        18 hours ago

        How many decimal places can it be stretched?

      • MyBrainHurts@piefed.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        17 hours ago

        As usual, the best jokes are in the comments. (Though goddamn I chuckled at the meme.)

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      17 hours ago

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

      • calcopiritus@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        13 hours 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
          1
          ·
          14 minutes ago

          You are proposing that can represent the entire rational set?

      • WhiskyTangoFoxtrot@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        16 hours ago

        No. They all need to mimic certain numbers.

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          13 minutes ago

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

          What exactly is being mimicked?

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.

  • 2.73K users / day
  • 5.05K users / week
  • 9.55K users / month
  • 19.8K users / 6 months
  • 1 local subscriber
  • 26.8K subscribers
  • 1.82K Posts
  • 67.8K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.13
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org