Date: Fri, 21 Feb 2003 02:12:50 -0800 From: David Schultz <das@FreeBSD.ORG> To: Tim Robbins <tjr@FreeBSD.ORG> Cc: standards@FreeBSD.ORG, obrien@FreeBSD.ORG Subject: Re: importing gdtoa Message-ID: <20030221101250.GA56852@HAL9000.homeunix.com> In-Reply-To: <20030221203916.A40755@dilbert.robbins.dropbear.id.au> References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030221203916.A40755@dilbert.robbins.dropbear.id.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Tim Robbins <tjr@FreeBSD.ORG>: > On Fri, Feb 21, 2003 at 12:55:08AM -0800, David Schultz wrote: > > > Some time in the next two weekends, I plan to fiddle with David > > Gay's gdtoa sources, which include implementations of strtod and > > dtoa for all IEEE 754 formats. It is laid out so that the only > > source file in it we should have to modify is gdtoaimp.h. > > Great. My only real concern with this is that it may add too much > bloat to statically linked binaries. This version seems to have four > or five times more lines of code than the one we currently use. > I'd rather that we didn't add the non-standard functions (strtoIQ(), > strtopf(), etc.) to libc until they're needed for something. For a given architecture, we would only link what's absolutely necessary, i.e. strtof, strtod, possibly one of {strtopx, strtopxL, strtoQ}, and the corresponding dtoa functions. The versions for computing intervals and approximations with rounding direction specified would be omitted from the build[1]. I can create an option to disable long double support in printf(), thus eliminating printf's dependency on gdtoa() in situations where the overhead is unacceptable. Also, notice that all of the functions except the ones to handle doubles are defined in terms of the generic routines strtodg() and gdtoa(), so the incremental cost of adding more functions is relatively small once you pay 1700 LOC up front. [1] Should they also be omitted from the import? I don't know if they will be of any use for standards-related work or otherwise. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030221101250.GA56852>