Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Eh? That page says nothing about 1/0 being 0, or anything like that. That function takes the harmonic mean of the non-zero samples, and then adjusts the result by multiplying it by the fraction of the samples that are non-zero. It purposefully avoids dividing by 0. And the result of that function for a==0 and b!=0 is b/2, not b or 2b. So not only is what you claim to be obvious not obvious, it's flat-out wrong.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: