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

The first example is incomplete: it forgets to clear and then check errno and/or check the returned value to +-HUGE_VAL! That'd probably slow down the strtod version a bit more.


strtod() could also return 0 on underflow.

But to be fair, the C++17 example doesn't check for underflow or overflow either.




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

Search: