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

It's also logically incoherent - division by zero can't occur, because if b=0 then abs(b) < sys.float_info.epsilon.

Furthermore, the code is happy to return NaN from the pre-checks, but replaces a NaN result from the division by None. That doesn't make any sense from an API design standpoint.



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

Search: