Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
SAI_Peregrinus
on Sept 10, 2020
|
parent
|
context
|
favorite
| on:
Parsing floats in C++: benchmarking strtod vs. fro...
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.
jwilk
on Sept 11, 2020
[–]
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: