24 ms·
Or just defining the result of division by zero as zero "for safety": https://www.hillelwayne.com/post/divide-by-zero/ https://www.hillelwayne.com/post/divide-b
by fbanon 4y ago
Or just defining the result of division by zero as zero "for safety": https://www.hillelwayne.com/post/divide-by-zero/ https://www.hillelwayne.com/post/divide-by-zero/
It boggles the mind, truly!
- jgwil2 4y agoAre you claiming the author is incorrect that x/0 = 0 is mathematically sound?
- littlestymaar 4y agoDepends how you define “soundness”, but the idea of prolonging a function out of its definition domain with an arbitrary value that doesn't make it continuous is arguably a curious one. From an algebra perspective (the one given in the blog post) it may be fine, but from a calculus perspective it's really not. The lack of continuity really hurts when you add floating points shenanigans into the mix, just a fun example: When you have 1/0 = 0 but 1/(0.3 - 0.2 - 0.1) = 36028797018963970. Oopsie, that's must be the biggest floating point approximation ever made.
- fluoridation 4y agoBut for 1/x you have that issue anyway. If x is on the negative side of the asymptote but a numerical error yields a positive x, you'll still end up with a massive difference.
- RunSet 4y agoI don't know about "mathematically sound" but I would rather retain the convention that any number divided by itself equals 1.