Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Plauger & Brodie strtod description Message-ID: <11877@smoke.BRL.MIL> Date: 5 Jan 90 01:33:02 GMT References: <1294@quintus.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <1294@quintus.UUCP> ok@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.