|
From: Hans-Bernhard B. <br...@ph...> - 2005-06-11 09:05:13
|
Ethan Merritt wrote: > On Thursday 09 June 2005 07:34 pm, Hans-Bernhard Br=F6ker wrote: >=20 >>>strtod() is more portable than %n, >> >>Unless we have somebody verify to us that strtod() implements the same >>ANSI standard more correctly than sscanf(), on OS-9, we don't know that= =2E >=20 >=20 > ?? The point is that using strtod we don't *need* %n. > Where does "more correctly" come into it? We have two library functions doing essentially the same thing, both=20 specified precisely enough by C Standards for 15 years now. We know of=20 one OS that got one of them wrong, at one point in time at least. How=20 do we know there isn't also a platform that gets the other one just as=20 wrong? The answer is, we don't. > Not that it's a big deal, since the code currently has no provision > for reported over- or under- flow. It has (weak) provision for inf and NaN, though, elsewhere. |