0x4E4F@sh.itjust.works to linuxmemes@lemmy.worldEnglish · 17 days agoBro tried to divide by zerosh.itjust.worksimagemessage-square22fedilinkarrow-up1463
arrow-up1463imageBro tried to divide by zerosh.itjust.works0x4E4F@sh.itjust.works to linuxmemes@lemmy.worldEnglish · 17 days agomessage-square22fedilink
minus-squareBumblefumble@lemm.eelinkfedilinkarrow-up3·17 days ago10/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).
minus-squareNeatNit@discuss.tchncs.delinkfedilinkarrow-up1·15 days agoTo 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.
minus-squareReveredOxygen@sh.itjust.workslinkfedilinkEnglisharrow-up7·17 days agoIt’s undefined in math, but not floating point arithmetic
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).
deleted by creator
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.
It’s undefined in math, but not floating point arithmetic