PenisWenisGenius ,

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.

haui_lemmy ,
@haui_lemmy@lemmy.giftedmc.com avatar

That yours @db0 ? :D

null ,
@null@slrpnk.net avatar
ulterno ,
@ulterno@lemmy.kde.social avatar
❯ qalc
> 1/0

  1 / 0 = 1 / 0

MrSoup ,
@MrSoup@lemmy.zip avatar

Finally! Now humanity knows the answer!

ulterno ,
@ulterno@lemmy.kde.social avatar

I even does prime factorization of integers longer than 64bit

treesoid ,

Thank you for enlightening me to the existance of qalc

bruhduh ,
@bruhduh@lemmy.world avatar
cygnus ,
@cygnus@lemmy.ca avatar

5318008

CodingCarpenter ,

AHHH MY VIRGIN EYES!

boredsquirrel ,

Another deltachat enjoyer?

Atelopus-zeteki ,
@Atelopus-zeteki@kbin.run avatar

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

rockSlayer ,
NeatNit ,

AFAIK that should give you +infinity, not NaN

DannyBoy ,

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

NeatNit ,

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.

Abnorc ,

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 ,

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 ,

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 ,

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 ,

[Thema, Post oder Kommentar wurde durch den Author gelöscht]

  • Loading...
  • NeatNit ,

    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 ,
    @ReveredOxygen@sh.itjust.works avatar

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

  • Alle
  • Abonniert
  • Moderiert
  • Favoriten
  • random
  • linuxmemes@lemmy.world
  • haupteingang
  • Alle Magazine