On 12/04/2013 10:22 AM, Dave Mitchell wrote: > On Tue, Dec 03, 2013 at 01:21:53PM -0500, Morten Welinder wrote: >> If I understand you right, you are rolling your own atof. > > Yep. > >> That is tricky business. > > Yep. > >> There are some tricky cases at >> >> http://www.exploringbinary.com/incorrectly-rounded-conversions-in-gcc-and-glibc/ >> >> that glibc has only recently gotten right. > > Thanks. > > Does anyone know why we roll our own? > There is a comment in sv.c /* This is evil, but floating point is even more evil */ It may be because we found plenty of bugs in vendor libc's and thought we could do a better job. Also is the issue of locales. (That's why we shouldn't be using atoi()).Thread Previous