←back to thread

180 points xnacly | 1 comments | | HN request time: 0.21s | source
1. ptspts ◴[] No.44569491[source]
The Str_to_double code in the article produces inaccurate results in the last few bits. (What is the use of parsing a double inaccurately?) Accurate parsing of a double is really tricky (and memory-hungry and slow). The strtod(3) function provided by a decent libc (such as glibc and musl, and also the FreeBSD libc) can do it correctly.