SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
0x4E4F@sh.itjust.works to linuxmemes@lemmy.worldEnglish · 1 year ago

Bro tried to divide by zero

sh.itjust.works

message-square
22
fedilink
467

Bro tried to divide by zero

sh.itjust.works

0x4E4F@sh.itjust.works to linuxmemes@lemmy.worldEnglish · 1 year ago
message-square
22
fedilink
alert-triangle
You must log in or register to comment.
  • Atelopus-zeteki@kbin.run
    link
    fedilink
    arrow-up
    43
    ·
    1 year ago

    LoL I just tried 10/0 and got “Not a number”.

    • rockSlayer@lemmy.world
      link
      fedilink
      arrow-up
      36
      ·
      1 year ago

      You are technically correct, the best kind of correct

    • NeatNit@discuss.tchncs.de
      link
      fedilink
      arrow-up
      7
      arrow-down
      15
      ·
      1 year ago

      AFAIK that should give you +infinity, not NaN

      • Abnorc@lemm.ee
        link
        fedilink
        arrow-up
        30
        ·
        1 year ago

        Almost. 1/x approaches infinity from the positive direction, but it approaches negative infinity from the negative direction. Since they approach different values, you can’t even say the limit of 1/x is infinity. It’s just undefined.

        • affiliate@lemmy.world
          link
          fedilink
          arrow-up
          12
          ·
          1 year ago

          it is possible to rigorously say that 1/0 = ∞. this is commonly occurs in complex analysis when you look at things as being defined on the Riemann sphere instead of the complex plane. thinking of things as taking place on a sphere also helps to avoid the “positive”/“negative” problem: as |x| shrinks, 1 / |x| increases, so you eventually reach the top of the sphere, which is the point at infinity.

        • NeatNit@discuss.tchncs.de
          link
          fedilink
          arrow-up
          6
          ·
          1 year ago

          https://en.wikipedia.org/wiki/Division_by_zero#Floating-point_arithmetic

          In IEEE arithmetic, division of 0/0 or ∞/∞ results in NaN, but otherwise division always produces a well-defined result. Dividing any non-zero number by positive zero (+0) results in an infinity of the same sign as the dividend. Dividing any non-zero number by negative zero (−0) results in an infinity of the opposite sign as the dividend. This definition preserves the sign of the result in case of arithmetic underflow.

          • Bumblefumble@lemm.ee
            link
            fedilink
            arrow-up
            3
            arrow-down
            3
            ·
            1 year ago

            10/0 ≠ lim x->0+ 10/x

            Or in other words, the thing you keep quoting does not apply in this case. Any number divided by zero is undefined, not positive infinity (or negative infinity for that matter).

            • bequirtle@lemmy.world
              link
              fedilink
              arrow-up
              7
              ·
              1 year ago

              deleted by creator

              • NeatNit@discuss.tchncs.de
                link
                fedilink
                arrow-up
                1
                ·
                1 year ago

                To be fair, it turns out not all environments implement floating-point arithmetic by the IEEE spec, meaning division by 0 can produce different results depending on where you run it. So in C++ float division by zero is undefined: https://stackoverflow.com/questions/42926763/the-behaviour-of-floating-point-division-by-zero

                But I’m fairly sure (note: based on literally no research) that most environments today will behave like the IEEE spec.

            • ReveredOxygen@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              7
              ·
              1 year ago

              It’s undefined in math, but not floating point arithmetic

      • DannyBoy@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        6
        ·
        1 year ago

        It’s an error, since no amounts of zeros, even infinite, would make it equal 10.

        • NeatNit@discuss.tchncs.de
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          https://en.wikipedia.org/wiki/Division_by_zero#Floating-point_arithmetic

          In IEEE arithmetic, division of 0/0 or ∞/∞ results in NaN, but otherwise division always produces a well-defined result. Dividing any non-zero number by positive zero (+0) results in an infinity of the same sign as the dividend. Dividing any non-zero number by negative zero (−0) results in an infinity of the opposite sign as the dividend. This definition preserves the sign of the result in case of arithmetic underflow.

      • MonkderDritte@feddit.de
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        deleted by creator

  • cygnus@lemmy.ca
    link
    fedilink
    arrow-up
    25
    ·
    1 year ago

    5318008

    • CodingCarpenter@lemm.ee
      link
      fedilink
      arrow-up
      17
      ·
      1 year ago

      AHHH MY VIRGIN EYES!

  • bruhduh@lemmy.world
    link
    fedilink
    arrow-up
    27
    arrow-down
    2
    ·
    1 year ago

  • ulterno@lemmy.kde.social
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago
    ❯ qalc
    > 1/0
    
      1 / 0 = 1 / 0
    
    
    • treesoid@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Thank you for enlightening me to the existance of qalc

    • MrSoup@lemmy.zip
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      Finally! Now humanity knows the answer!

      • ulterno@lemmy.kde.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I even does prime factorization of integers longer than 64bit

  • null@slrpnk.net
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    edit-2
    1 year ago

    https://lemmy.dbzer0.com ?

  • haui@lemmy.giftedmc.com
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    That yours @db0@lemmy.dbzer0.com ? :D

    • 0x4E4F@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      deleted by creator

  • PenisWenisGenius@lemmynsfw.com
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    Typing in 80085 can get your calculator privledges revoked welcome to the new normal

    Wait wtf, is that gnome-calculator? You’d have to do some truly extreme shit to get banned from an open source program.

  • boredsquirrel@slrpnk.net
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Another deltachat enjoyer?

linuxmemes@lemmy.world

linuxmemes@lemmy.world

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: !linuxmemes@lemmy.world

Hint: :q!


Sister communities:
  • !tech_memes@lemmy.world
  • !memes@lemmy.world
  • !lemmyshitpost@lemmy.world
  • !risa@startrek.website

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like “every user of thing”.
  • Don’t get baited into back-and-forth insults. We are not animals.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures

We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.

  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t remove France.

Visibility: Public
globe

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

  • 2.03K users / day
  • 4.95K users / week
  • 9.12K users / month
  • 19.1K users / 6 months
  • 281 local subscribers
  • 25K subscribers
  • 1.66K Posts
  • 95K Comments
  • Modlog
  • mods:
  • Kevin@lemmy.world
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org