Subject: Re: lib/17630: atof(3) lacks of some precision
To: <>
From: David Laight <>
List: netbsd-bugs
Date: 07/18/2002 11:36:11
> NetBSD manpage seems to insinuate that atof() is simpy equivalent to
> strtod(nptr, (char **)NULL). It's not sufficient (as far i understand
> the english word "equivalent").

The only difference in netbsd between atof(x) and strtod(x,0) is
that the former uses slightly more stack!  I call that equivalent.

Historically atof() is older than strtod(), the latter being implemented
in order to allow invalid input to be detected.
It is quite possible that (at least for a while) some systems had
independant implementions of the two functions - in which case the
error detection of strtod(x,0) might have been better than that of

Clearly strtod(x,&y) gives better error REPORTING than atof(x)
and strtod(x,0).


David Laight: