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
  • 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).

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

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

      • 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.

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.07K users / day
  • 4.76K users / week
  • 9.06K users / month
  • 19.1K users / 6 months
  • 281 local subscribers
  • 25K subscribers
  • 1.66K Posts
  • 95.1K Comments
  • Modlog
  • mods:
  • Kevin@lemmy.world
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org