Parodia
  • Communities
  • Multi-communities
  • Support Lemmy
  • Search
  • Login
  • Sign Up
Memes@lemmy.mlbyArthur Besse@lemmy.ml
25 days

IEEE 754

English
Omni-Man looking at the IEEE 754 Single Precision Floating-Point Standard and saying "look what they need to mimic a fraction" with the rest of the meme whited out

https://en.wikipedia.org/wiki/IEEE_754

cross-posted from: https://lemmy.ml/post/24332731

Stolen Cross-posted from here: https://fosstodon.org/@foo/113731569632505985

7
    You must log in or register to comment.

    • finallymadeanaccount@lemmy.worldEnglish
      25 days

      Son of a bitch. Actual fifteen seconds of real laughter. Maybe even twenty.

      • the_beber@feddit.org
        25 days

        And sometimes it seems irrational.

          • Anna@lemmy.ml
            25 days

            And other times 0.1 + 0.2 = 0.3000004

              • Arthur Besse@lemmy.mlEnglish
                25 days

                And other times 0.1 + 0.2 = 0.3000004

                0.1 + 0.2 != 0.3000004

                You’re off by 0.000000399999999955991114575226674787700176239013671875

                (0.1 + 0.2 is actually 0.3000000000000000444089209850062616169452667236328125)

                (And 0.1 is actually 0.1000000000000000055511151231257827021181583404541015625, and so on. People unfamiliar with IEEE 754 may be surprised by the output of python -c 'print("%.60f" % 0.1)')

            • pleiades@lemmy.ml
              24 days

              Funny meme, never got why they used a bias instead of two’s complement for the exponent though

                • CausticFlames@sopuli.xyz
                  24 days

                  they could have used two’s complement for the exponent, but the biased exponent is objectively a better encoding for what floating point hardware needs to do.

                  This is paraphrased like mad, but basically that means hardware can compare exponent fields as plain unsigned integers. With twos complement, unsigned comparison says 255 > 1, even though -1 < 1. So every comparison would need special signed comparison logic.

                    • pleiades@lemmy.ml
                      23 days

                      Gotcha, very cool!

                  Memes@lemmy.ml

                  memes@lemmy.ml

                  Subscribe from remote instance

                  Create post

                  Report community

                  Modlog
                  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: !memes@lemmy.ml

                  Rules:

                  1. Be civil and nice.
                  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.
                  Visibility: Public

                  This community is visible to everyone.

                  • 476 users / Day
                  • 1.87K users / Week
                  • 5.34K users / Month
                  • 7.1K users / 6 months
                  • 1.19K posts
                  • 8.18K comments
                  • 1 local subscriber
                  • 56.7K subscribers
                  • Mods:
                  • ghost_laptop@lemmy.ml
                  • BE: 1.0.0-beta.1
                  • Modlog
                  • Legal
                  • Instances
                  • Docs
                  • Code
                  • join-lemmy.org