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

Who cares?

This is about the approximation to pi not the approximation to float(atan(1))*4, it is exact (but irrelevant) for the later, for the former you loose two bits, so you have a 25% chance of correctly rounding towards pi.



this is incorrect. float(pi)/4 exactly equals float(atan(1)). multiplication by 4 doesn't touch the mantisa. it just increments the exponent by 2




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

Search: