Plauger & Brodie strtod description

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Jan 5 12:33:02 AEST 1990


In article <1294 at quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
>Q1: have Plauger & Brodie got it right?

No; they oversimplified.  The railroad-track syntax should be applied
AFTER conceptually editing the subject sequence to insert a decimal
point after its last digit.  The actual X3.159 specification of
strtod() is rather elaborate, but that was necessary in order to get
details like this right.  The simplification leaves out some essential
details.

"1234" is successfully converted by strtod(), which returns 1234.0.



More information about the Comp.std.c mailing list