*BSD News Article 3851


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!gumby!destroyer!ubc-cs!uw-beaver!news.u.washington.edu!serval!phys1.physics.wsu.edu!hlu
From: hlu@phys1.physics.wsu.edu (Hongjiu Lu)
Subject: Re: Bug Report: Missing strtod in 386BSD, plus code
Message-ID: <1992Aug19.001910.11335@serval.net.wsu.edu>
Sender: news@serval.net.wsu.edu (USENET News System)
Organization: Washington State University
References: <1992Aug16.215006.16480@NeoSoft.com> <1992Aug17.182133.16570@serval.net.wsu.edu> <1992Aug18.154258.25227@NeoSoft.com>
Date: Wed, 19 Aug 92 00:19:10 GMT
Lines: 26

In article <1992Aug18.154258.25227@NeoSoft.com>, karl@NeoSoft.com (Karl Lehenbauer) writes:
|> hlu@phys1.physics.wsu.edu (Hongjiu Lu) writes:
|> Please don't use it. The code is a joke. Please send a note to
|> David M. Gay at dmg@research.att.com. He has what you want.
|> 
|> It's not like it calls scanf or something.  I can't read your mind.  What
|> is wrong with it?  And why don't you just post the code?
|> -- 
|> -- Email info@NeoSoft.com for info on getting interactive Internet access.
|> You will now awaken feeling relaxed and refreshed, remembering everything 
|> you've read except the details of the Omega contingency plan.

The precision of strtod () in bsd and glibc is too low to use. I found
out it while I was implementing the Linux C library. I had to hack one myself. In libg++.a 2.2, Per included the strtod () by David M. Gay, which does the 
same thing, except for mine was a quick hack. Since I have been using Per's
iostream based stdio in the Linux C library, I just used his strtod () in
libg++.a 2.2 to replace mine in the Linux C library.

To get a real strtod (), you should get libg++.a 2.2. Take a look at
libg++-2.2/libg++/iostream/dtoa.C. BTW, it is wriiten in C. If you
somehow don't want to use it, I can make mine available for you.


-- 
H.J.
Gcc/libc maintainer for Linux.