News for hackers. Stuff that matters.
Re:Python, unlike C, has the mod operator always return a po... by duskwuff on Thursday December 30, 2021 @04:31AM (#29735134)
> I've never heard of any mathematical argument that justifies division by zero yielding 0

0/x = 0 for all x except zero; defining 0/0=0 removes that exception.

Re:Python, unlike C, has the mod operator always return a po... by AlbinNP on Thursday December 30, 2021 @05:27AM (#29735489)
x/x = 1 for all x except 0; defining 0/0 = 1 removes that exception.
Re:Python, unlike C, has the mod operator always return a po... by hwayne on Thursday December 30, 2021 @11:42AM (#29738206)
Split the difference, 0/0 = 0.5
Re:Python, unlike C, has the mod operator always return a po... by ben_w on Monday January 03, 2022 @04:38AM (#29778956)
It gets worse: differentiation would be 0/0 if you went straight to the limit rather than just approaching it, so 0/0 can be any differentiable function, not just a value.

(Caveat: I’m probably being slightly imprecise with my language here)