From owner-freebsd-standards Mon Feb 17 16: 3:50 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B27D837B401 for ; Mon, 17 Feb 2003 16:03:48 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9427443F3F for ; Mon, 17 Feb 2003 16:03:47 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id A654953B5; Tue, 18 Feb 2003 01:03:44 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Kris Kennaway Cc: standards@freebsd.org Subject: Re: -fno-builtin world breaks in gperf References: <20030217213405.GB71679@rot13.obsecurity.org> From: Dag-Erling Smorgrav Date: Tue, 18 Feb 2003 01:03:44 +0100 In-Reply-To: <20030217213405.GB71679@rot13.obsecurity.org> (Kris Kennaway's message of "Mon, 17 Feb 2003 13:34:05 -0800") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kris Kennaway writes: > On Mon, Feb 17, 2003 at 03:46:15PM +0100, Dag-Erling Smorgrav wrote: > > Our libm doesn't seem to support long double at all, yet our libstdc++ > > requires long double support. > I pointed this out a while ago..looks like no-one did anything about > it yet. I've looked at it, and it looks Hard[tm]. The four architectures I tested (alpha, ia32, ia64, sparc64) had four different representations for long double: alpha 00 00 00 00 00 00 00 00 3f f0 00 00 00 00 00 00 40 09 21 fb 54 44 2e ea ia32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3f ff 80 00 00 00 00 00 00 00 00 00 40 00 c9 0f da a2 21 77 50 00 ia64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3f ff 80 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 c9 0f da a2 21 77 50 00 sparc64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3f ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 92 1f b5 44 42 ee a0 00 00 00 00 00 00 00 The numbers I tested were 0, 1, and as many digits of pi as I could remember off-hand. I've corrected for endianness so that the hex digits are presented in big-endian order for all four architectures. So far, I've concluded the following: - alpha doesn't have a separate long double type - it's just an alias for double which has an 11-bit exponent and a 52-bit mantissa. - ia32 and ia64 seem to have 80-bit long doubles which they store in 96 and 128 bits, respectively. They seem to use a 16-bit exponent and a 63-bit mantissa. - sparc64 seems to have 80-bit long doubles which it stores in 128 bits (it's big-endian, so what looks like trailing padding is actually leading padding like on ia32 and sparc64). It seems to use a 15-bit exponent and a 64-bit mantissa. I haven't had a chance to look at powerpc yet. An implementation of the ISO C long double math functions (all 92 of them, not counting long double complex!) would have to handle all the above cases, either in separate files or in #ifdef hell. For alpha, we could just define macros which cast the arguments to double, call the appropriate double function and cast the result to long double, but for the three other platforms (+ ppc?) we need actual code. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Feb 17 16:37:23 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3F7C37B401 for ; Mon, 17 Feb 2003 16:37:22 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E82243F85 for ; Mon, 17 Feb 2003 16:37:22 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 5328653B6; Tue, 18 Feb 2003 01:37:20 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Kris Kennaway Cc: standards@freebsd.org Subject: Re: -fno-builtin world breaks in gperf From: Dag-Erling Smorgrav Date: Tue, 18 Feb 2003 01:37:19 +0100 In-Reply-To: (Dag-Erling Smorgrav's message of "Tue, 18 Feb 2003 01:03:44 +0100") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) References: <20030217213405.GB71679@rot13.obsecurity.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dag-Erling Smorgrav writes: > An implementation of the ISO C long double math functions (all 92 of > them, not counting long double complex!) Umm, 46, I counted them twice. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Feb 17 16:49:17 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 069AB37B401 for ; Mon, 17 Feb 2003 16:49:16 -0800 (PST) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id F06E443F93 for ; Mon, 17 Feb 2003 16:49:14 -0800 (PST) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id 7A77A9BC3; Mon, 17 Feb 2003 19:36:55 -0500 (EST) Date: Mon, 17 Feb 2003 19:36:55 -0500 From: Mike Barcroft To: Dag-Erling Smorgrav Cc: Kris Kennaway , standards@freebsd.org Subject: Re: -fno-builtin world breaks in gperf Message-ID: <20030217193655.I74149@espresso.bsdmike.org> References: <20030217213405.GB71679@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ; from des@ofug.org on Tue, Feb 18, 2003 at 01:03:44AM +0100 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dag-Erling Smorgrav writes: > Kris Kennaway writes: > > On Mon, Feb 17, 2003 at 03:46:15PM +0100, Dag-Erling Smorgrav wrote: > > > Our libm doesn't seem to support long double at all, yet our libstdc++ > > > requires long double support. > > I pointed this out a while ago..looks like no-one did anything about > > it yet. > > I've looked at it, and it looks Hard[tm]. The four architectures I > tested (alpha, ia32, ia64, sparc64) had four different representations > for long double: [...] You might want to take a look at the fpclassify() implementation. It doesn't look like your findings are correct. Specifically, see the bitfield layouts in _fpmath.h. IIRC, long doubles are as follows: - alpha IEEE double (64-bit) format - ia64 IEEE quad (128-bit) format - i386 IEEE double-extended (80-bit) format - sparc64 IEEE quad (128-bit) format - powerpc IEEE quad (128-bit) format Plus the following quirks: - alpha doesn't support IEEE rounding by default (compiler options needed) - i386 and ia64 have a normalization bit in the mantissa - i386 has 101 other quirks that BDE knows about :) Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Feb 17 16:52:42 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D004937B401; Mon, 17 Feb 2003 16:52:41 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id F251543F75; Mon, 17 Feb 2003 16:52:40 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 83D4153B5; Tue, 18 Feb 2003 01:52:35 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Mike Barcroft Cc: Kris Kennaway , standards@freebsd.org Subject: Re: -fno-builtin world breaks in gperf From: Dag-Erling Smorgrav Date: Tue, 18 Feb 2003 01:52:34 +0100 In-Reply-To: <20030217193655.I74149@espresso.bsdmike.org> (Mike Barcroft's message of "Mon, 17 Feb 2003 19:36:55 -0500") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) References: <20030217213405.GB71679@rot13.obsecurity.org> <20030217193655.I74149@espresso.bsdmike.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Barcroft writes: > - i386 and ia64 have a normalization bit in the mantissa OK, that's why it looked to me like they had a 16-bit exponent. The extra bit was actually the normalization bit. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Feb 17 17: 4:48 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 633DC37B401 for ; Mon, 17 Feb 2003 17:04:46 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27D8C43F93 for ; Mon, 17 Feb 2003 17:04:45 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id MAA05616; Tue, 18 Feb 2003 12:04:17 +1100 Date: Tue, 18 Feb 2003 12:05:03 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dag-Erling Smorgrav Cc: Kris Kennaway , Subject: Re: -fno-builtin world breaks in gperf In-Reply-To: Message-ID: <20030218111318.I7804-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 18 Feb 2003, Dag-Erling Smorgrav wrote: > Kris Kennaway writes: > > On Mon, Feb 17, 2003 at 03:46:15PM +0100, Dag-Erling Smorgrav wrote: > > > Our libm doesn't seem to support long double at all, yet our libstdc++ > > > requires long double support. libstdc++ is broken too, starting with normally using a pre-configured (committed) config.h which is wrong if you add -fno-builtin to CFLAGS. > > I pointed this out a while ago..looks like no-one did anything about > > it yet. > > I've looked at it, and it looks Hard[tm]. The four architectures I > tested (alpha, ia32, ia64, sparc64) had four different representations > for long double: It's not hard for fabsl(). Just modify the recently committed signbit() to clear the sign bit instead of returning it, not quite like s_fabs.c and s_fabsf.c already clear the sign bit for fabs() and fabsf(). It's hard, or at least large, for all the 'l' functions. > So far, I've concluded the following: > > - alpha doesn't have a separate long double type - it's just an alias > for double which has an 11-bit exponent and a 52-bit mantissa. > > - ia32 and ia64 seem to have 80-bit long doubles which they store in > 96 and 128 bits, respectively. They seem to use a 16-bit exponent > and a 63-bit mantissa. > > - sparc64 seems to have 80-bit long doubles which it stores in 128 > bits (it's big-endian, so what looks like trailing padding is > actually leading padding like on ia32 and sparc64). It seems to > use a 15-bit exponent and a 64-bit mantissa. > > I haven't had a chance to look at powerpc yet. These numbers can now be read off from the struct definitions in libc/*/_fpmath.h. They are almost correct. The i386 exponent/mantissa are 15/64, not 16/63. Similarly for the ia64 except the mantissa size. ia64, powerpc and sparc64 all have a 128-bit format with a 96-bit mantissa. I'm not sure if all 96 bits are used. > An implementation of the ISO C long double math functions (all 92 of > them, not counting long double complex!) would have to handle all the > above cases, either in separate files or in #ifdef hell. For alpha, See glibc. It seems to have both, plus extra complications and combinatorial explosion from doing things in asm too %-). > we could just define macros which cast the arguments to double, call > the appropriate double function and cast the result to long double, > but for the three other platforms (+ ppc?) we need actual code. We (er, you) could cast for all machines, but this would give a low quality implementation and might confuse autoconfig'ed ports into not using better workarounds for missing 'l' functions. OTOH, implementing most of the 'f' functions by casting to double would increase the quality of most of them. Some of the 'f' functions are slower than the double functions since they don't use the hardware functions, and some of them (powf() and __ieee754_rem_pio2f() at least) are buggy due to mistranslation of magic numbers. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Feb 17 20: 1: 1 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48AC537B401 for ; Mon, 17 Feb 2003 20:01:00 -0800 (PST) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBA9043F93 for ; Mon, 17 Feb 2003 20:00:59 -0800 (PST) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id 5F8539BC3; Mon, 17 Feb 2003 22:48:40 -0500 (EST) Date: Mon, 17 Feb 2003 22:48:40 -0500 From: Mike Barcroft To: Dag-Erling Smorgrav Cc: Kris Kennaway , standards@freebsd.org Subject: Re: -fno-builtin world breaks in gperf Message-ID: <20030217224840.L74149@espresso.bsdmike.org> References: <20030217213405.GB71679@rot13.obsecurity.org> <20030217193655.I74149@espresso.bsdmike.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030217193655.I74149@espresso.bsdmike.org>; from mike@FreeBSD.org on Mon, Feb 17, 2003 at 07:36:55PM -0500 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Barcroft writes: > Dag-Erling Smorgrav writes: > > Kris Kennaway writes: > > > On Mon, Feb 17, 2003 at 03:46:15PM +0100, Dag-Erling Smorgrav wrote: > > > > Our libm doesn't seem to support long double at all, yet our libstdc++ > > > > requires long double support. > > > I pointed this out a while ago..looks like no-one did anything about > > > it yet. > > > > I've looked at it, and it looks Hard[tm]. The four architectures I > > tested (alpha, ia32, ia64, sparc64) had four different representations > > for long double: > [...] > > You might want to take a look at the fpclassify() implementation. It > doesn't look like your findings are correct. Specifically, see the > bitfield layouts in _fpmath.h. > > IIRC, long doubles are as follows: [...] > - ia64 IEEE quad (128-bit) format Oops, this is actually just a double-extended 80-bit, but aligned to 16-bytes. I'm in the progress of testing a fix for _fpmath.h. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Feb 17 20: 4:19 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CACCD37B401 for ; Mon, 17 Feb 2003 20:04:18 -0800 (PST) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69EFE43F85 for ; Mon, 17 Feb 2003 20:04:18 -0800 (PST) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id 11BD29C66; Mon, 17 Feb 2003 22:51:59 -0500 (EST) Date: Mon, 17 Feb 2003 22:51:59 -0500 From: Mike Barcroft To: Lukas Ertl Cc: freebsd-standards@freebsd.org Subject: Re: ftw.h Message-ID: <20030217225159.M74149@espresso.bsdmike.org> References: <20030213201249.T337@leelou.in.tern> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030213201249.T337@leelou.in.tern>; from l.ertl@univie.ac.at on Thu, Feb 13, 2003 at 08:14:51PM +0100 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Lukas Ertl writes: > Hi, > > how is the progress on ftw.h and related functions going? The status board > lists Kyle Martin from 16 August 2002 as halfway done. I currently have > some spare cycles so could take a lot at it or help out. Apparently Kyle is almost finished. His mail server wasn't working or something, but he should be able to reply shortly. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Feb 17 22:10:58 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D75937B401; Mon, 17 Feb 2003 22:10:56 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC28B43F3F; Mon, 17 Feb 2003 22:10:55 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h1I6AsQb011365; Mon, 17 Feb 2003 22:10:54 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h1I6Areb011364; Mon, 17 Feb 2003 22:10:53 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Mon, 17 Feb 2003 22:10:53 -0800 From: David Schultz To: Mike Barcroft Cc: Dag-Erling Smorgrav , Kris Kennaway , standards@FreeBSD.ORG Subject: Re: -fno-builtin world breaks in gperf Message-ID: <20030218061053.GB10838@HAL9000.homeunix.com> Mail-Followup-To: Mike Barcroft , Dag-Erling Smorgrav , Kris Kennaway , standards@FreeBSD.ORG References: <20030217213405.GB71679@rot13.obsecurity.org> <20030217193655.I74149@espresso.bsdmike.org> <20030217224840.L74149@espresso.bsdmike.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030217224840.L74149@espresso.bsdmike.org> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Mike Barcroft : > Mike Barcroft writes: > > Dag-Erling Smorgrav writes: > > > Kris Kennaway writes: > > > > On Mon, Feb 17, 2003 at 03:46:15PM +0100, Dag-Erling Smorgrav wrote: > > > > > Our libm doesn't seem to support long double at all, yet our libstdc++ > > > > > requires long double support. > > > > I pointed this out a while ago..looks like no-one did anything about > > > > it yet. > > > > > > I've looked at it, and it looks Hard[tm]. The four architectures I > > > tested (alpha, ia32, ia64, sparc64) had four different representations > > > for long double: > > [...] > > > > You might want to take a look at the fpclassify() implementation. It > > doesn't look like your findings are correct. Specifically, see the > > bitfield layouts in _fpmath.h. > > > > IIRC, long doubles are as follows: > [...] > > - ia64 IEEE quad (128-bit) format > > Oops, this is actually just a double-extended 80-bit, but aligned to > 16-bytes. I'm in the progress of testing a fix for _fpmath.h. BTW, float.h for ia64 is wrong about long doubles, too. In fact, I'll bet *most* archtectures have it wrong, since they all copied from i386, and even i386 had it wrong until a few months ago. Here's the (unverified) output of 'enquire -f' on an ia64 Linux box. DECIMAL_DIG will probably need to be updated according to the formula in the standard as well. /* Number of base-FLT_RADIX digits in the significand of a long double */ #undef LDBL_MANT_DIG #define LDBL_MANT_DIG 64 /* Number of decimal digits of precision in a long double */ #undef LDBL_DIG #define LDBL_DIG 18 /* Difference between 1.0 and the minimum long double greater than 1.0 */ #undef LDBL_EPSILON #define LDBL_EPSILON 1.08420217248550443401e-19L /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ #undef LDBL_MIN_EXP #define LDBL_MIN_EXP (-16381) /* Minimum normalised long double */ #undef LDBL_MIN #define LDBL_MIN 3.36210314311209350626e-4932L /* Minimum int x such that 10**x is a normalised long double */ #undef LDBL_MIN_10_EXP #define LDBL_MIN_10_EXP (-4931) /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ #undef LDBL_MAX_EXP #define LDBL_MAX_EXP 16384 /* Maximum long double */ #undef LDBL_MAX #define LDBL_MAX 1.18973149535723176502e+4932L /* Maximum int x such that 10**x is a representable long double */ #undef LDBL_MAX_10_EXP #define LDBL_MAX_10_EXP 4932 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Feb 18 1:14:13 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B628737B401 for ; Tue, 18 Feb 2003 01:14:12 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD1AF43F93 for ; Tue, 18 Feb 2003 01:14:11 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id D211E53B5; Tue, 18 Feb 2003 10:14:07 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bruce Evans Cc: Kris Kennaway , Subject: Re: -fno-builtin world breaks in gperf From: Dag-Erling Smorgrav Date: Tue, 18 Feb 2003 10:14:07 +0100 In-Reply-To: <20030218111318.I7804-100000@gamplex.bde.org> (Bruce Evans's message of "Tue, 18 Feb 2003 12:05:03 +1100 (EST)") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) References: <20030218111318.I7804-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans writes: > libstdc++ is broken too, starting with normally using a pre-configured > (committed) config.h which is wrong if you add -fno-builtin to CFLAGS. No, it looks to me like config.h is correct but the code is wrong in that it doesn't respect it (i.e. it uses fabsl() even if config.h "knows" the system doesn't have fabsl()) DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Feb 18 1:42:23 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E96837B401 for ; Tue, 18 Feb 2003 01:42:22 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id E87D743F75 for ; Tue, 18 Feb 2003 01:42:20 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA05962; Tue, 18 Feb 2003 20:34:44 +1100 Date: Tue, 18 Feb 2003 20:35:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dag-Erling Smorgrav Cc: Kris Kennaway , Subject: Re: -fno-builtin world breaks in gperf In-Reply-To: Message-ID: <20030218202321.G9090-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 18 Feb 2003, Dag-Erling Smorgrav wrote: > Bruce Evans writes: > > libstdc++ is broken too, starting with normally using a pre-configured > > (committed) config.h which is wrong if you add -fno-builtin to CFLAGS. > > No, it looks to me like config.h is correct but the code is wrong in > that it doesn't respect it (i.e. it uses fabsl() even if config.h > "knows" the system doesn't have fabsl()) Right. I forgot that -fno-builin only turns off the mapping of standard functions to builtins :-(. 95% of the references to *BUILTIN* in libstdc++ seem to be in to autconfig or (Change)Log unused macros. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Feb 18 2:40:17 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF6B037B401 for ; Tue, 18 Feb 2003 02:40:16 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id F046443F3F for ; Tue, 18 Feb 2003 02:40:15 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id C10EE537C; Tue, 18 Feb 2003 11:40:13 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bruce Evans Cc: Subject: Re: -fno-builtin world breaks in gperf From: Dag-Erling Smorgrav Date: Tue, 18 Feb 2003 11:40:12 +0100 In-Reply-To: <20030218111318.I7804-100000@gamplex.bde.org> (Bruce Evans's message of "Tue, 18 Feb 2003 12:05:03 +1100 (EST)") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) References: <20030218111318.I7804-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans writes: > These numbers can now be read off from the struct definitions in > libc/*/_fpmath.h. Shouldn't fpmath.h and _fpmath.h live in sys/sys and sys/$ARCH/include since they are not specific to libc but rather a characteristic of the hardware architecture? We may want to use them outside libc (in libm, for instance). DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Feb 18 14:48: 6 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9628937B401 for ; Tue, 18 Feb 2003 14:48:05 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3813A43F85 for ; Tue, 18 Feb 2003 14:48:04 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id JAA01266; Wed, 19 Feb 2003 09:47:54 +1100 Date: Wed, 19 Feb 2003 09:48:44 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dag-Erling Smorgrav Cc: standards@FreeBSD.ORG Subject: Re: -fno-builtin world breaks in gperf In-Reply-To: Message-ID: <20030219093945.N11080-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 18 Feb 2003, Dag-Erling Smorgrav wrote: > Bruce Evans writes: > > These numbers can now be read off from the struct definitions in > > libc/*/_fpmath.h. > > Shouldn't fpmath.h and _fpmath.h live in sys/sys and sys/$ARCH/include > since they are not specific to libc but rather a characteristic of the > hardware architecture? We may want to use them outside libc (in libm, > for instance). Maybe. I looked for them there first :-). A case can be made for putting them only in src/lib since the kernel shouldn't care about the details of FPU registers (some FPU emulators do, but have their own data structures). libm also has its own data structures. It avoids using bitfields and mostly accesses the registers via high and low "words" to reduce unportability. I prefer this, but it doesn't work so well for 10-byte long doubles. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 2:54: 6 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D63737B401 for ; Wed, 19 Feb 2003 02:54:05 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C63843F3F for ; Wed, 19 Feb 2003 02:54:04 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 67230536E; Wed, 19 Feb 2003 11:54:01 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: standards@freebsd.org Subject: More missing math functions From: Dag-Erling Smorgrav Date: Wed, 19 Feb 2003 11:54:01 +0100 Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Aside from long double support, we seem to be missing the following math functions (and their float equivalents): Function Description Notes ---------------------------------------------------------------------- exp2(x) 2^x Documented but not implemented fdim(x, y) |x - y| fma(x, y, z) x * y + z fmax(x, y) x > y ? x : y fmin(x, y) x < y ? x : y log2(x) log_2(x) nan(str) NaN The meaning of str is implementation-defined nearbyint(x) rint(x) Unlike rint(), does not raise an exception nexttoward(x, y) nextafter(x, y) The second argument is a long double remquo(x, y, *q) remainder(x, y) Stores ((x / y) mod 2n) in *q (n >= 3) DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 3: 0:18 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 792FD37B401 for ; Wed, 19 Feb 2003 03:00:17 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFD3243F75 for ; Wed, 19 Feb 2003 03:00:16 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 798A1536E; Wed, 19 Feb 2003 12:00:11 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: standards@freebsd.org Subject: Re: More missing math functions From: Dag-Erling Smorgrav Date: Wed, 19 Feb 2003 12:00:10 +0100 In-Reply-To: (Dag-Erling Smorgrav's message of "Wed, 19 Feb 2003 11:54:01 +0100") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dag-Erling Smorgrav writes: > Aside from long double support, we seem to be missing the following > math functions (and their float equivalents): Oomph, I pressed "send" before I was done. There are three more missing functions: round(x) rounds to nearest integer, rounds halfway cases away from zero scalbln(x, n) as scalbn(x, n), but n is a long int trunc(x) rounds toward zero DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 9:57: 1 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBAD437B401 for ; Wed, 19 Feb 2003 09:57:00 -0800 (PST) Received: from marvin.bsdng.org (24-196-109-36.jvl.wi.charter.com [24.196.109.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7426943F75 for ; Wed, 19 Feb 2003 09:56:59 -0800 (PST) (envelope-from mkm@marvin.bsdng.org) Received: from marvin.bsdng.org (localhost.bsdng.org [127.0.0.1]) by marvin.bsdng.org (8.12.6/8.12.6) with ESMTP id h1HAZqr5049353 for ; Mon, 17 Feb 2003 04:35:52 -0600 (CST) (envelope-from mkm@marvin.bsdng.org) Received: (from mkm@localhost) by marvin.bsdng.org (8.12.6/8.12.6/Submit) id h1HAZq1f049352 for freebsd-standards@FreeBSD.ORG; Mon, 17 Feb 2003 04:35:52 -0600 (CST) Date: Mon, 17 Feb 2003 04:35:52 -0600 From: Kyle Martin To: freebsd-standards@FreeBSD.ORG Subject: Re: ftw.h Message-ID: <20030217103552.GA49310@marvin.bsdng.org> Mail-Followup-To: freebsd-standards@FreeBSD.ORG References: <20030213201249.T337@leelou.in.tern> <200302131932.h1DJWGWc037983@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302131932.h1DJWGWc037983@khavrinen.lcs.mit.edu> User-Agent: Mutt/1.4i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Feb 13, 2003 at 02:32:16PM -0500, Garrett Wollman wrote: > > how is the progress on ftw.h and related functions going? The status board > > lists Kyle Martin from 16 August 2002 as halfway done. I currently have > > some spare cycles so could take a lot at it or help out. > I'm hoping that some changes made a few months ago to fts(3) will make > it easier to implement an ftw() veneer. It's pretty much done. ftw() is a wrapper for nftw() which is a wrapper for fts(). I'd like to add more FTS_ flags compatible to FTW_ so that i can simply define FTW_ flags to the FTS_ equivelants and just pass them directly. Code to follow soon... -- Kyle Martin , http://www.bsdng.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 12:11:46 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AF5937B405 for ; Wed, 19 Feb 2003 12:11:44 -0800 (PST) Received: from numeri.campus.luth.se (numeri.campus.luth.se [130.240.197.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 299EE43F93 for ; Wed, 19 Feb 2003 12:11:43 -0800 (PST) (envelope-from k@numeri.campus.luth.se) Received: from numeri.campus.luth.se (localhost [127.0.0.1]) by numeri.campus.luth.se (8.12.6/8.12.6) with ESMTP id h1JKBfoL064425 for ; Wed, 19 Feb 2003 21:11:41 +0100 (CET) (envelope-from k@numeri.campus.luth.se) Received: (from k@localhost) by numeri.campus.luth.se (8.12.6/8.12.6/Submit) id h1JKBf8A064420 for freebsd-standards@freebsd.org; Wed, 19 Feb 2003 21:11:41 +0100 (CET) Date: Wed, 19 Feb 2003 21:11:41 +0100 From: Johan Karlsson To: freebsd-standards@freebsd.org Subject: Fwd: using 'PRIu64' from to get rid of warnings Message-ID: <20030219201141.GA75809@numeri.campus.luth.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm resending this to standards with the hope that someone here will know if this is accepted usaged of PRIu64 and others. /Johan K ----- Forwarded message from Johan Karlsson ----- From: Johan Karlsson To: FreeBSD-audit Subject: using 'PRIu64' from to get rid of warnings Date: Sun, 2 Feb 2003 21:36:26 +0100 Hi is this the correct way to remove warning in printf statements? Index: camcontrol.c =================================================================== RCS file: /home/ncvs/src/sbin/camcontrol/camcontrol.c,v retrieving revision 1.48 diff -u -r1.48 camcontrol.c --- camcontrol.c 17 Dec 2002 06:05:21 -0000 1.48 +++ camcontrol.c 2 Feb 2003 19:00:52 -0000 @@ -30,6 +30,8 @@ #include #include + +#include #include #include #include @@ -3086,7 +3088,8 @@ percentage = 10000 * val; fprintf(stdout, - "\rFormatting: %qd.%02qd %% " + "\rFormatting: " + "%"PRIu64".%02"PRIu64" %% " "(%d/%d) done", percentage / (0x10000 * 100), (percentage / 0x10000) % 100, The warnings are /usr/src/sbin/camcontrol/camcontrol.c: In function `scsiformat': /usr/src/sbin/camcontrol/camcontrol.c:3082: warning: long long int format, u_int64_t arg (arg 3) /usr/src/sbin/camcontrol/camcontrol.c:3082: warning: long long int format, u_int64_t arg (arg 4) Are the PRIu64 et al documented somewhere? /Johan K -- Johan Karlsson mailto:johan@FreeBSD.org ----- End forwarded message ----- -- Johan Karlsson mailto:johan@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 12:28:42 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49DD137B401; Wed, 19 Feb 2003 12:28:41 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1272E43F3F; Wed, 19 Feb 2003 12:28:40 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.6/8.12.6) with ESMTP id h1JKScbs093216 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 19 Feb 2003 15:28:39 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.6/8.12.6/Submit) id h1JKScdZ093213; Wed, 19 Feb 2003 15:28:38 -0500 (EST) (envelope-from wollman) Date: Wed, 19 Feb 2003 15:28:38 -0500 (EST) From: Garrett Wollman Message-Id: <200302192028.h1JKScdZ093213@khavrinen.lcs.mit.edu> To: Johan Karlsson Cc: freebsd-standards@FreeBSD.ORG Subject: Fwd: using 'PRIu64' from to get rid of warnings In-Reply-To: <20030219201141.GA75809@numeri.campus.luth.se> References: <20030219201141.GA75809@numeri.campus.luth.se> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > I'm resending this to standards with the hope that someone > here will know if this is accepted usaged of PRIu64 and others. PRIu64 is evil and rude. Please don't use it. The correct way to print an integer of (notionally) unknown width would be: printf("foo: %ju", (u_intmax_t)foo); /* for unsigned foo */ printf("foo: %jd", (intmax_t)foo); /* for signed foo */ ...unless the value is known to have one of the other two standard opaque integer types (ptrdiff_t and size_t), or the code path ensures that a smaller type is appropriate. For example: if (foo < expression_of_type_unsigned_int) { printf("foo is small (%u < %u)", (unsigned)foo, expression_of_type_unsigned_int); } (In this case, `expression_of_type_unsigned_int' might be a constant expression that is known to be small.) But unless this is in an inner loop, it's probably not worth optimizing even this much. Just use intmax_t. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 14: 7:27 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB97837B401 for ; Wed, 19 Feb 2003 14:07:25 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99F2D43F75 for ; Wed, 19 Feb 2003 14:07:24 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id JAA08001; Thu, 20 Feb 2003 09:07:13 +1100 Date: Thu, 20 Feb 2003 09:08:07 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dag-Erling Smorgrav Cc: standards@FreeBSD.ORG Subject: Re: More missing math functions In-Reply-To: Message-ID: <20030220085333.M14561-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 19 Feb 2003, Dag-Erling Smorgrav wrote: > Aside from long double support, we seem to be missing the following > math functions (and their float equivalents): > > Function Description Notes > ---------------------------------------------------------------------- > exp2(x) 2^x Documented but not implemented Not documented. I removed bogus .Nm's and links for exp2 and exp2f a while ago. You apparently have stale links. > fdim(x, y) |x - y| > ... > fmax(x, y) x > y ? x : y > fmin(x, y) x < y ? x : y At least in n869.txt, fmin() and fmax() are reqired to return the non-NaN arg if one of the args is a NaN. Someone whoe should know (Hauser?) objected to this in com.std.c. fdim() doesn't seem to be bug for bug compatible here. Anyway, a simple comparison might not be right here. > log2(x) log_2(x) Was bogusly documented like exp2. > ... Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 14:32:24 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1477437B401; Wed, 19 Feb 2003 14:32:23 -0800 (PST) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF4FA43F93; Wed, 19 Feb 2003 14:32:21 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost [127.0.0.1]) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6) with ESMTP id h1JMXEhE096486; Wed, 19 Feb 2003 17:33:14 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id h1JMXDuj096476; Wed, 19 Feb 2003 17:33:13 -0500 (EST) Date: Wed, 19 Feb 2003 17:33:13 -0500 From: Craig Rodrigues To: freebsd-standards@freebsd.org Cc: kan@freebsd.org Subject: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030219223313.GA93707@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, On my -CURRENT system, WCHAR_MIN and WCHAR_MAX are not defined in . What should they be defined to? On my Linux system, I see that they are defined as: #define __WCHAR_MIN (-2147483647l - 1l) #define __WCHAR_MAX (2147483647l) 2147483647 is equal to 0x7FFFFFFF. In another library, I have seen them defined as: # define WCHAR_MIN ((wchar_t) 0) # define WCHAR_MAX (~WCHAR_MIN) What are the correct values for FreeBSD? Thanks. -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 16:29: 9 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41EE237B401; Wed, 19 Feb 2003 16:29:08 -0800 (PST) Received: from dilbert.robbins.dropbear.id.au (184.b.005.mel.iprimus.net.au [210.50.41.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 522C343F85; Wed, 19 Feb 2003 16:29:05 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (fwgcy7ndw6krpjjt@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id h1K0SuFa037778; Thu, 20 Feb 2003 11:28:57 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id h1K0Sl9a037777; Thu, 20 Feb 2003 11:28:47 +1100 (EST) (envelope-from tim) Date: Thu, 20 Feb 2003 11:28:47 +1100 From: Tim Robbins To: Craig Rodrigues Cc: freebsd-standards@FreeBSD.org, kan@FreeBSD.org Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030220112847.A36977@dilbert.robbins.dropbear.id.au> References: <20030219223313.GA93707@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030219223313.GA93707@attbi.com>; from rodrigc@attbi.com on Wed, Feb 19, 2003 at 05:33:13PM -0500 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Feb 19, 2003 at 05:33:13PM -0500, Craig Rodrigues wrote: > Hi, > > On my -CURRENT system, WCHAR_MIN and WCHAR_MAX are not defined > in . > > What should they be defined to? > > On my Linux system, I see that they are defined as: > > #define __WCHAR_MIN (-2147483647l - 1l) > #define __WCHAR_MAX (2147483647l) > > 2147483647 is equal to 0x7FFFFFFF. > > In another library, I have seen them defined as: > > # define WCHAR_MIN ((wchar_t) 0) > # define WCHAR_MAX (~WCHAR_MIN) > > > What are the correct values for FreeBSD? The correct values are the same as Linux but without the 'l' suffix: #define WCHAR_MIN (-2147483647 - 1) #define WCHAR_MAX 2147483647 The second definition of WCHAR_MIN and WCHAR_MAX is incorrect because it uses casts in the expression; IIRC, it needs to be possible to use these values in preprocessor #if statements: #if WCHAR_MIN == 0 /* wchar_t is unsigned */ #endif I'll add a definition of WCHAR_MIN and WCHAR_MAX to as soon as I can find a clean (non-polluting) way of doing it. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 18: 9:52 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65FC337B401; Wed, 19 Feb 2003 18:09:51 -0800 (PST) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3795243FAF; Wed, 19 Feb 2003 18:09:50 -0800 (PST) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id A6A399C5B; Wed, 19 Feb 2003 20:57:26 -0500 (EST) Date: Wed, 19 Feb 2003 20:57:26 -0500 From: Mike Barcroft To: Tim Robbins Cc: Craig Rodrigues , freebsd-standards@FreeBSD.org, kan@FreeBSD.org Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030219205726.G61431@espresso.bsdmike.org> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030220112847.A36977@dilbert.robbins.dropbear.id.au>; from tjr@FreeBSD.org on Thu, Feb 20, 2003 at 11:28:47AM +1100 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Tim Robbins writes: > I'll add a definition of WCHAR_MIN and WCHAR_MAX to as soon as I > can find a clean (non-polluting) way of doing it. Do we need a with underscored macro variants? Why the specification's authors couldn't keep all the limits in a single header, I'll never know. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 18:27:54 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7EA837B401; Wed, 19 Feb 2003 18:27:52 -0800 (PST) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id C733B43FA3; Wed, 19 Feb 2003 18:27:51 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost [127.0.0.1]) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6) with ESMTP id h1K2SjhE076867; Wed, 19 Feb 2003 21:28:45 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id h1K2Sixr076854; Wed, 19 Feb 2003 21:28:44 -0500 (EST) Date: Wed, 19 Feb 2003 21:28:44 -0500 From: Craig Rodrigues To: Mike Barcroft Cc: freebsd-standards@FreeBSD.org, kan@FreeBSD.org Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030220022844.GA69709@attbi.com> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030219205726.G61431@espresso.bsdmike.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Feb 19, 2003 at 08:57:26PM -0500, Mike Barcroft wrote: > Tim Robbins writes: > > I'll add a definition of WCHAR_MIN and WCHAR_MAX to as soon as I > > can find a clean (non-polluting) way of doing it. > > Do we need a with underscored macro variants? Wait a minute. I was just stumbling around the header files and found this in #ifndef WCHAR_MIN /* Also possibly defined in */ /* Limits of wchar_t. */ #define WCHAR_MIN INT32_MIN #define WCHAR_MAX INT32_MAX /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX #endif Is this stuff in the correct place? Does it need to be duplicated in ? > Why the specification's authors couldn't keep all the limits in a single > header, I'll never know. I agree. -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 18:38:58 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7CDC37B401; Wed, 19 Feb 2003 18:38:57 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id B161A43F85; Wed, 19 Feb 2003 18:38:56 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h1K2cs9l093268; Wed, 19 Feb 2003 18:38:54 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h1K2csOR093267; Wed, 19 Feb 2003 18:38:54 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Wed, 19 Feb 2003 18:38:54 -0800 From: David Schultz To: Mike Barcroft Cc: Tim Robbins , Craig Rodrigues , freebsd-standards@FreeBSD.ORG, kan@FreeBSD.ORG Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030220023854.GA93198@HAL9000.homeunix.com> Mail-Followup-To: Mike Barcroft , Tim Robbins , Craig Rodrigues , freebsd-standards@FreeBSD.ORG, kan@FreeBSD.ORG References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030219205726.G61431@espresso.bsdmike.org> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Mike Barcroft : > Tim Robbins writes: > > I'll add a definition of WCHAR_MIN and WCHAR_MAX to as soon as I > > can find a clean (non-polluting) way of doing it. > > Do we need a with underscored macro variants? Why > the specification's authors couldn't keep all the limits in a single > header, I'll never know. It would be nice for math.h's FP_ILOGB* macros, which should really be defined in terms of INT_MIN and INT_MAX. But unless someone decides to change the size of an int any time soon, that may not be enough to justify going out of the way to make a _limits.h. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 19: 9:28 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 115AB37B401; Wed, 19 Feb 2003 19:09:27 -0800 (PST) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69DD043F75; Wed, 19 Feb 2003 19:09:26 -0800 (PST) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id 9B1529C5B; Wed, 19 Feb 2003 21:57:02 -0500 (EST) Date: Wed, 19 Feb 2003 21:57:02 -0500 From: Mike Barcroft To: Craig Rodrigues Cc: freebsd-standards@FreeBSD.org, kan@FreeBSD.org Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030219215702.H61431@espresso.bsdmike.org> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> <20030220022844.GA69709@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030220022844.GA69709@attbi.com>; from rodrigc@attbi.com on Wed, Feb 19, 2003 at 09:28:44PM -0500 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Craig Rodrigues writes: > On Wed, Feb 19, 2003 at 08:57:26PM -0500, Mike Barcroft wrote: > > Tim Robbins writes: > > > I'll add a definition of WCHAR_MIN and WCHAR_MAX to as soon as I > > > can find a clean (non-polluting) way of doing it. > > > > Do we need a with underscored macro variants? > > Wait a minute. I was just stumbling around the header files > and found this in > > #ifndef WCHAR_MIN /* Also possibly defined in */ > /* Limits of wchar_t. */ > #define WCHAR_MIN INT32_MIN > #define WCHAR_MAX INT32_MAX > > /* Limits of wint_t. */ > #define WINT_MIN INT32_MIN > #define WINT_MAX INT32_MAX > #endif > > > Is this stuff in the correct place? > Does it need to be duplicated in ? INT32_MIN isn't in scope in . Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 19:14:40 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F8F737B401; Wed, 19 Feb 2003 19:14:39 -0800 (PST) Received: from dilbert.robbins.dropbear.id.au (184.b.005.mel.iprimus.net.au [210.50.41.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EBE143F75; Wed, 19 Feb 2003 19:14:37 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (mzz61kjiusi6be1s@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id h1K3ETFa042422; Thu, 20 Feb 2003 14:14:30 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id h1K3EApB042421; Thu, 20 Feb 2003 14:14:10 +1100 (EST) (envelope-from tim) Date: Thu, 20 Feb 2003 14:14:10 +1100 From: Tim Robbins To: Mike Barcroft Cc: Craig Rodrigues , freebsd-standards@FreeBSD.ORG, kan@FreeBSD.ORG Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030220141410.A42150@dilbert.robbins.dropbear.id.au> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030219205726.G61431@espresso.bsdmike.org>; from mike@FreeBSD.ORG on Wed, Feb 19, 2003 at 08:57:26PM -0500 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Feb 19, 2003 at 08:57:26PM -0500, Mike Barcroft wrote: > Tim Robbins writes: > > I'll add a definition of WCHAR_MIN and WCHAR_MAX to as soon as I > > can find a clean (non-polluting) way of doing it. > > Do we need a with underscored macro variants? Why > the specification's authors couldn't keep all the limits in a single > header, I'll never know. That would work. If the real information about limits was in machine/_limits.h, machine/limits.h would be MI and could be renamed to sys/limits.h if backwards compatibility was not an issue. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 19:16:10 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98CB237B401; Wed, 19 Feb 2003 19:16:09 -0800 (PST) Received: from mx7.mail.ru (mx7.mail.ru [194.67.57.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5624E43F85; Wed, 19 Feb 2003 19:16:07 -0800 (PST) (envelope-from kan@mail.ru) Received: from [141.154.59.211] (helo=kan.dnsalias.net) by mx7.mail.ru with esmtp (Exim SMTP.7) id 18lhBt-000BK0-00; Thu, 20 Feb 2003 06:16:05 +0300 Received: from kan.dnsalias.net (ak03@localhost [127.0.0.1]) by kan.dnsalias.net (8.12.7/8.12.7) with ESMTP id h1K3G3LD084111; Wed, 19 Feb 2003 22:16:03 -0500 (EST) (envelope-from kan@kan.dnsalias.net) Received: (from kan@localhost) by kan.dnsalias.net (8.12.7/8.12.7/Submit) id h1K3G2oS084110; Wed, 19 Feb 2003 22:16:02 -0500 (EST) Date: Wed, 19 Feb 2003 22:16:02 -0500 From: Alexander Kabaev To: Tim Robbins Cc: mike@FreeBSD.ORG, rodrigc@attbi.com, freebsd-standards@FreeBSD.ORG, kan@FreeBSD.ORG Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-Id: <20030219221602.365ec588.kabaev@bellatlantic.net> In-Reply-To: <20030220141410.A42150@dilbert.robbins.dropbear.id.au> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> <20030220141410.A42150@dilbert.robbins.dropbear.id.au> Reply-To: ak03@gte.com X-Mailer: Sylpheed version 0.8.10claws18 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Linux just uses bits/_wchar.h for that purpose :) On Thu, 20 Feb 2003 14:14:10 +1100 Tim Robbins wrote: > On Wed, Feb 19, 2003 at 08:57:26PM -0500, Mike Barcroft wrote: > > > Tim Robbins writes: > > > I'll add a definition of WCHAR_MIN and WCHAR_MAX to as > > > soon as I can find a clean (non-polluting) way of doing it. > > > > Do we need a with underscored macro variants? > > Why the specification's authors couldn't keep all the limits in a > > single header, I'll never know. > > That would work. If the real information about limits was in > machine/_limits.h, machine/limits.h would be MI and could be > renamed to sys/limits.h if backwards compatibility was not > an issue. > > > > Tim > -- Alexander Kabaev To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 19:23: 1 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F32637B409; Wed, 19 Feb 2003 19:23:00 -0800 (PST) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AFE243F75; Wed, 19 Feb 2003 19:22:59 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost [127.0.0.1]) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6) with ESMTP id h1K3NqhE095735; Wed, 19 Feb 2003 22:23:52 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id h1K3NpDL095730; Wed, 19 Feb 2003 22:23:51 -0500 (EST) Date: Wed, 19 Feb 2003 22:23:51 -0500 From: Craig Rodrigues To: kan@freebsd.org Cc: freebsd-standards@freebsd.org Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030220032351.GA95104@attbi.com> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> <20030220141410.A42150@dilbert.robbins.dropbear.id.au> <20030219221602.365ec588.kabaev@bellatlantic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030219221602.365ec588.kabaev@bellatlantic.net> User-Agent: Mutt/1.4i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Feb 19, 2003 at 10:16:02PM -0500, Alexander Kabaev wrote: > Linux just uses bits/_wchar.h for that purpose :) Yeah, I was just thinking about this, and was going to either support Mike's suggestion of , or suggest something like . Either way, I have to say, Ewwwwwwww. :) -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 19:26: 6 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A29437B401; Wed, 19 Feb 2003 19:26:05 -0800 (PST) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6337243F93; Wed, 19 Feb 2003 19:26:04 -0800 (PST) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id A23779C4C; Wed, 19 Feb 2003 22:13:40 -0500 (EST) Date: Wed, 19 Feb 2003 22:13:40 -0500 From: Mike Barcroft To: Tim Robbins Cc: Craig Rodrigues , freebsd-standards@FreeBSD.ORG, kan@FreeBSD.ORG Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030219221340.I61431@espresso.bsdmike.org> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> <20030220141410.A42150@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030220141410.A42150@dilbert.robbins.dropbear.id.au>; from tjr@FreeBSD.ORG on Thu, Feb 20, 2003 at 02:14:10PM +1100 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Tim Robbins writes: > On Wed, Feb 19, 2003 at 08:57:26PM -0500, Mike Barcroft wrote: > > > Tim Robbins writes: > > > I'll add a definition of WCHAR_MIN and WCHAR_MAX to as soon as I > > > can find a clean (non-polluting) way of doing it. > > > > Do we need a with underscored macro variants? Why > > the specification's authors couldn't keep all the limits in a single > > header, I'll never know. > > That would work. If the real information about limits was in > machine/_limits.h, machine/limits.h would be MI and could be > renamed to sys/limits.h if backwards compatibility was not > an issue. is an implementation detail for userland. We could always make include with an appropriate #warning to transition consumers over. I vote for this option. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Feb 19 19:30:15 2003 Delivered-To: freebsd-standards@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 043AB37B401; Wed, 19 Feb 2003 19:30:15 -0800 (PST) Date: Wed, 19 Feb 2003 21:30:14 -0600 From: Juli Mallett To: Mike Barcroft Cc: Tim Robbins , Craig Rodrigues , freebsd-standards@FreeBSD.ORG, kan@FreeBSD.ORG Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030219213014.A63399@FreeBSD.org> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> <20030220141410.A42150@dilbert.robbins.dropbear.id.au> <20030219221340.I61431@espresso.bsdmike.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030219221340.I61431@espresso.bsdmike.org>; from mike@FreeBSD.org on Wed, Feb 19, 2003 at 10:13:40PM -0500 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-LiveJournal: flata, jmallett X-Negacore: Yes X-Title: Code Maven Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * De: Mike Barcroft [ Data: 2003-02-19 ] [ Subjecte: Re: WCHAR_MIN and WCHAR_MAX not defined in ] > is an implementation detail for userland. We could > always make include with an > appropriate #warning to transition consumers over. > > I vote for this option. Same here, by all means! -- Juli Mallett - AIM: BSDFlata -- IRC: juli on EFnet OpenDarwin, Mono, FreeBSD Developer - ircd-hybrid Developer, EFnet addict FreeBSD on MIPS-Anything on FreeBSD - Never trust an ELF, COFF or Mach-O! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Feb 20 1: 4:13 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7458037B401 for ; Thu, 20 Feb 2003 01:04:12 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9DAC43F75 for ; Thu, 20 Feb 2003 01:04:11 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 2AC15536E; Thu, 20 Feb 2003 10:04:10 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bruce Evans Cc: standards@FreeBSD.ORG Subject: Re: More missing math functions From: Dag-Erling Smorgrav Date: Thu, 20 Feb 2003 10:04:09 +0100 In-Reply-To: <20030220085333.M14561-100000@gamplex.bde.org> (Bruce Evans's message of "Thu, 20 Feb 2003 09:08:07 +1100 (EST)") Message-ID: User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386--freebsd) References: <20030220085333.M14561-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans writes: > Not documented. I removed bogus .Nm's and links for exp2 and exp2f a > while ago. You apparently have stale links. You're right. > At least in n869.txt, fmin() and fmax() are reqired to return the > non-NaN arg if one of the args is a NaN. I know, I've implemented both of them this way. > fdim() doesn't seem to be > bug for bug compatible here. I misunderstood n869 as regards fdim(); it should be x > y ? x - y : +0 DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Feb 20 18:44:34 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCF8D37B401; Thu, 20 Feb 2003 18:44:32 -0800 (PST) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDC8443FA3; Thu, 20 Feb 2003 18:44:31 -0800 (PST) (envelope-from rodrigc@attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost [127.0.0.1]) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6) with ESMTP id h1L2jQhE035474; Thu, 20 Feb 2003 21:45:26 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost) by h00609772adf0.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id h1L2jPRh035473; Thu, 20 Feb 2003 21:45:25 -0500 (EST) Date: Thu, 20 Feb 2003 21:45:25 -0500 From: Craig Rodrigues To: freebsd-standards@freebsd.org Cc: kan@freebsd.org Subject: Re: WCHAR_MIN and WCHAR_MAX not defined in Message-ID: <20030221024525.GA35437@attbi.com> References: <20030219223313.GA93707@attbi.com> <20030220112847.A36977@dilbert.robbins.dropbear.id.au> <20030219205726.G61431@espresso.bsdmike.org> <20030220141410.A42150@dilbert.robbins.dropbear.id.au> <20030219221340.I61431@espresso.bsdmike.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030219221340.I61431@espresso.bsdmike.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Feb 19, 2003 at 10:13:40PM -0500, Mike Barcroft wrote: > is an implementation detail for userland. We could > always make include with an > appropriate #warning to transition consumers over. > > I vote for this option. Sounds good to me. The reason why I am interested in this stuff is to get wchar_t support working in GCC on FreeBSD. Alex Kabaev listed the problems in FreeBSD which prevent the GCC configure process from properly using wchar_t in libstdc++: http://gcc.gnu.org/ml/gcc/2003-02/msg01291.html The lack of WCHAR_MIN/WCHAR_MAX in was one of the problems. Do you need any help implementing ? -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Feb 21 0:55:11 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F120537B401; Fri, 21 Feb 2003 00:55:09 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 705C643FA3; Fri, 21 Feb 2003 00:55:09 -0800 (PST) (envelope-from das@FreeBSD.org) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h1L8t89l055875; Fri, 21 Feb 2003 00:55:08 -0800 (PST) (envelope-from das@FreeBSD.org) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h1L8t8OQ055874; Fri, 21 Feb 2003 00:55:08 -0800 (PST) (envelope-from das@FreeBSD.org) Date: Fri, 21 Feb 2003 00:55:08 -0800 From: David Schultz To: standards@FreeBSD.org Cc: obrien@FreeBSD.org Subject: importing gdtoa Message-ID: <20030221085508.GA55786@HAL9000.homeunix.com> Mail-Followup-To: standards@FreeBSD.ORG, obrien@FreeBSD.ORG Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. Here is my plan, with a few tweaks suggested by mike@. Does anyone have any comments before I throw this together in a local repository? Also, is there any CVS voodoo I need to be aware of to do the import, other than 'cvs import'? - Import gdtoa sources into src/contrib/netlib/gdtoa, except for gdtoaimp.h, which goes into src/lib/libc/include. - Add src/lib/libc/stdlib/Makefile.gdtoa to build the gdtoa stuff with the correct CFLAGS. The decision of which versions of the files to compile (i.e. long double = (double|extended|quad|double double)) needs to be MD. Put this in src/lib/libc/$arch/stdlib/Makefile.gdtoa. - Make the necessary modifications to gdtoaimp.h to support threads and Alpha and PPC quirks, and prefix exported symbols with underscores. - Remove the present src/lib/libc/stdlib/strtod.c. There shouldn't be any useful local hacks in here that can't be stuck in gdtoaimp.h. (We lose 'restrict' qualifiers.) - Add src/lib/libc/$arch/stdlib/strtod.c, which contains __weak_reference(correct-sym-for-this-arch, strtold); as well as similar glue for dtoa for printf. - Update printf() to properly handle long doubles by using gdtoa(). - Update manpages. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Feb 21 1:39:26 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E83C37B401; Fri, 21 Feb 2003 01:39:25 -0800 (PST) Received: from dilbert.robbins.dropbear.id.au (142.b.006.mel.iprimus.net.au [210.50.45.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBF1E43FBF; Fri, 21 Feb 2003 01:39:22 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (ygw7xmxue4dtqky4@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id h1L9dJ2c041579; Fri, 21 Feb 2003 20:39:19 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id h1L9dJwX041578; Fri, 21 Feb 2003 20:39:19 +1100 (EST) (envelope-from tim) Date: Fri, 21 Feb 2003 20:39:16 +1100 From: Tim Robbins To: David Schultz Cc: standards@FreeBSD.ORG, obrien@FreeBSD.ORG Subject: Re: importing gdtoa Message-ID: <20030221203916.A40755@dilbert.robbins.dropbear.id.au> References: <20030221085508.GA55786@HAL9000.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030221085508.GA55786@HAL9000.homeunix.com>; from das@FreeBSD.ORG on Fri, Feb 21, 2003 at 12:55:08AM -0800 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: 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. > - Update printf() to properly handle long doubles by using gdtoa(). And scanf() by using strtof() and strtold(). I'll write wcstof() and wcstold() as wrappers around strtof() and strtold() and have them ready to commit along with your import of gdtoa. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Feb 21 2:12:54 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCBD037B4C0; Fri, 21 Feb 2003 02:12:52 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id B78D943FCB; Fri, 21 Feb 2003 02:12:51 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h1LACo9l056952; Fri, 21 Feb 2003 02:12:50 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h1LACoWo056951; Fri, 21 Feb 2003 02:12:50 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Fri, 21 Feb 2003 02:12:50 -0800 From: David Schultz To: Tim Robbins Cc: standards@FreeBSD.ORG, obrien@FreeBSD.ORG Subject: Re: importing gdtoa Message-ID: <20030221101250.GA56852@HAL9000.homeunix.com> Mail-Followup-To: Tim Robbins , standards@FreeBSD.ORG, obrien@FreeBSD.ORG References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030221203916.A40755@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030221203916.A40755@dilbert.robbins.dropbear.id.au> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Tim Robbins : > 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 From owner-freebsd-standards Fri Feb 21 9: 9:50 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BA1437B401; Fri, 21 Feb 2003 09:09:49 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81CEC43FDF; Fri, 21 Feb 2003 09:09:48 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.6/8.12.6) with ESMTP id h1LH9lbs012792 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 21 Feb 2003 12:09:48 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.6/8.12.6/Submit) id h1LH9lPu012789; Fri, 21 Feb 2003 12:09:47 -0500 (EST) (envelope-from wollman) Date: Fri, 21 Feb 2003 12:09:47 -0500 (EST) From: Garrett Wollman Message-Id: <200302211709.h1LH9lPu012789@khavrinen.lcs.mit.edu> To: David Schultz Cc: standards@FreeBSD.ORG Subject: Re: importing gdtoa In-Reply-To: <20030221101250.GA56852@HAL9000.homeunix.com> References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030221203916.A40755@dilbert.robbins.dropbear.id.au> <20030221101250.GA56852@HAL9000.homeunix.com> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > The versions for computing intervals and approximations with > rounding direction specified would be omitted from the build[1]. I would really prefer to see them officially supported, rather than ignored. Sometimes you have to lead the standards, and I believe that numerical methods types would actually like to have functions like these available. The additional code required for any single instantiation is quite small. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Feb 21 10:20:21 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF6D137B401; Fri, 21 Feb 2003 10:20:20 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7552A43FB1; Fri, 21 Feb 2003 10:20:19 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.6/8.12.6) with ESMTP id h1LIKIbs013556 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 21 Feb 2003 13:20:18 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.6/8.12.6/Submit) id h1LIKHhQ013553; Fri, 21 Feb 2003 13:20:17 -0500 (EST) (envelope-from wollman) Date: Fri, 21 Feb 2003 13:20:17 -0500 (EST) From: Garrett Wollman Message-Id: <200302211820.h1LIKHhQ013553@khavrinen.lcs.mit.edu> To: Tim Robbins Cc: standards@FreeBSD.ORG Subject: Re: importing gdtoa In-Reply-To: <20030221203916.A40755@dilbert.robbins.dropbear.id.au> References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030221203916.A40755@dilbert.robbins.dropbear.id.au> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > I'll write wcstof() and wcstold() as wrappers around strtof() and > strtold() and have them ready to commit along with your import > of gdtoa. Is this really the right thing? Is there a mbsto*() set of functions as well, or are the strto*() functions supposed to be able to deal with that? We are supposed, I believe, to support arbitrary national digits in these functions, in addition to the Portable Character Set digits. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Feb 21 12: 7:21 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C3CB37B401 for ; Fri, 21 Feb 2003 12:07:20 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA1CD43FD7 for ; Fri, 21 Feb 2003 12:07:19 -0800 (PST) (envelope-from das@FreeBSD.org) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h1LK7I9l059831; Fri, 21 Feb 2003 12:07:18 -0800 (PST) (envelope-from das@FreeBSD.org) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h1LK7HNV059830; Fri, 21 Feb 2003 12:07:17 -0800 (PST) (envelope-from das@FreeBSD.org) Date: Fri, 21 Feb 2003 12:07:17 -0800 From: David Schultz To: Garrett Wollman Cc: standards@FreeBSD.org Subject: Re: importing gdtoa Message-ID: <20030221200717.GA59752@HAL9000.homeunix.com> Mail-Followup-To: Garrett Wollman , standards@FreeBSD.org References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030221203916.A40755@dilbert.robbins.dropbear.id.au> <20030221101250.GA56852@HAL9000.homeunix.com> <200302211709.h1LH9lPu012789@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302211709.h1LH9lPu012789@khavrinen.lcs.mit.edu> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Garrett Wollman : > < said: > > > The versions for computing intervals and approximations with > > rounding direction specified would be omitted from the build[1]. > > I would really prefer to see them officially supported, rather than > ignored. Sometimes you have to lead the standards, and I believe that > numerical methods types would actually like to have functions like > these available. The additional code required for any single > instantiation is quite small. This sounds reasonable, and it shouldn't pose any additional overhead on static binaries that don't use the interfaces. So the new plan is to add strtor[fdl], which allow one to specify rounding direction, and strtoI[fdl], which compute the interval containing the number. Both sets of routines would be weak symbols, declared in math.h only if __BSD_VISIBLE. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Feb 21 12:10:34 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76E5D37B401; Fri, 21 Feb 2003 12:10:33 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id D285743F75; Fri, 21 Feb 2003 12:10:32 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h1LKAV9l059880; Fri, 21 Feb 2003 12:10:31 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h1LKAVDo059879; Fri, 21 Feb 2003 12:10:31 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Fri, 21 Feb 2003 12:10:31 -0800 From: David Schultz To: Garrett Wollman Cc: Tim Robbins , standards@FreeBSD.ORG Subject: Re: importing gdtoa Message-ID: <20030221201031.GB59752@HAL9000.homeunix.com> Mail-Followup-To: Garrett Wollman , Tim Robbins , standards@FreeBSD.ORG References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030221203916.A40755@dilbert.robbins.dropbear.id.au> <200302211820.h1LIKHhQ013553@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302211820.h1LIKHhQ013553@khavrinen.lcs.mit.edu> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Garrett Wollman : > < said: > > > I'll write wcstof() and wcstold() as wrappers around strtof() and > > strtold() and have them ready to commit along with your import > > of gdtoa. > > Is this really the right thing? > > Is there a mbsto*() set of functions as well, or are the strto*() > functions supposed to be able to deal with that? > > We are supposed, I believe, to support arbitrary national digits in > these functions, in addition to the Portable Character Set digits. From the CVS logs for lib/libc/stdlib/strtod.c: ---------------------------- revision 1.12 date: 2001/11/28 03:57:12; author: ache; state: Exp; lines: +23 -23 Allow national (non-ASCII) digits ---------------------------- ... ---------------------------- revision 1.15 date: 2001/11/29 03:03:52; author: ache; state: Exp; lines: +24 -24 Back out national digits support, POSIX explicetely disallows it: The definition of character class digit requires that only ten characters -the ones defining digits- can be specified; alternate digits (for example, Hindi or Kanji) cannot be specified here. However, the encoding may vary if an implementation supports more than one encoding. The definition of character class xdigit requires that the characters included in character class digit are included here also and allows for different symbols for the hexadecimal digits 10 through 15. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Feb 21 12:27:22 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9298D37B401 for ; Fri, 21 Feb 2003 12:27:21 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D4DA43FBF for ; Fri, 21 Feb 2003 12:27:21 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h1LKRJ9l059976; Fri, 21 Feb 2003 12:27:19 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h1LKRJbZ059975; Fri, 21 Feb 2003 12:27:19 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Fri, 21 Feb 2003 12:27:19 -0800 From: David Schultz To: Garrett Wollman Cc: standards@FreeBSD.ORG Subject: Re: importing gdtoa Message-ID: <20030221202719.GB59891@HAL9000.homeunix.com> Mail-Followup-To: Garrett Wollman , standards@FreeBSD.ORG References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030221203916.A40755@dilbert.robbins.dropbear.id.au> <20030221101250.GA56852@HAL9000.homeunix.com> <200302211709.h1LH9lPu012789@khavrinen.lcs.mit.edu> <20030221200717.GA59752@HAL9000.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030221200717.GA59752@HAL9000.homeunix.com> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake David Schultz : > This sounds reasonable, and it shouldn't pose any additional > overhead on static binaries that don't use the interfaces. So the > new plan is to add strtor[fdl], which allow one to specify > rounding direction, and strtoI[fdl], which compute the interval > containing the number. Both sets of routines would be weak > symbols, declared in math.h only if __BSD_VISIBLE. s/math.h/stdlib.h/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Feb 21 12:43:10 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A8C737B401; Fri, 21 Feb 2003 12:43:09 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F6F343FBD; Fri, 21 Feb 2003 12:43:08 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.6/8.12.6) with ESMTP id h1LKh7bs014907 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 21 Feb 2003 15:43:07 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.6/8.12.6/Submit) id h1LKh7NG014904; Fri, 21 Feb 2003 15:43:07 -0500 (EST) (envelope-from wollman) Date: Fri, 21 Feb 2003 15:43:07 -0500 (EST) From: Garrett Wollman Message-Id: <200302212043.h1LKh7NG014904@khavrinen.lcs.mit.edu> To: David Schultz Cc: standards@FreeBSD.ORG Subject: Re: importing gdtoa In-Reply-To: <20030221201031.GB59752@HAL9000.homeunix.com> References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030221203916.A40755@dilbert.robbins.dropbear.id.au> <200302211820.h1LIKHhQ013553@khavrinen.lcs.mit.edu> <20030221201031.GB59752@HAL9000.homeunix.com> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: [I wrote:] >> We are supposed, I believe, to support arbitrary national digits in >> these functions, in addition to the Portable Character Set digits. > revision 1.15 > date: 2001/11/29 03:03:52; author: ache; state: Exp; lines: +24 -24 > Back out national digits support, POSIX explicetely disallows it: Ache is wrong. See XSH page 1442 line 44650: # In other than the C or POSIX locales, other implementation-defined # subject sequences may be accepted. The same dispensation is provided for strtol() on page 1449 and for strtoul() on page 1454. However, I was mistaken in that this does not represent a requirement on our part. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Feb 21 15:29:50 2003 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE2BF37B401 for ; Fri, 21 Feb 2003 15:29:48 -0800 (PST) Received: from dilbert.robbins.dropbear.id.au (008.b.012.mel.iprimus.net.au [210.50.249.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4317E43FD7 for ; Fri, 21 Feb 2003 15:29:46 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (d2p9qfwobb28xpt6@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id h1LNTc2c067540; Sat, 22 Feb 2003 10:29:38 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id h1LNTaKs067539; Sat, 22 Feb 2003 10:29:36 +1100 (EST) (envelope-from tim) Date: Sat, 22 Feb 2003 10:29:35 +1100 From: Tim Robbins To: Garrett Wollman Cc: standards@FreeBSD.org Subject: Re: importing gdtoa Message-ID: <20030222102935.A65681@dilbert.robbins.dropbear.id.au> References: <20030221085508.GA55786@HAL9000.homeunix.com> <20030221203916.A40755@dilbert.robbins.dropbear.id.au> <200302211820.h1LIKHhQ013553@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200302211820.h1LIKHhQ013553@khavrinen.lcs.mit.edu>; from wollman@lcs.mit.edu on Fri, Feb 21, 2003 at 01:20:17PM -0500 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Feb 21, 2003 at 01:20:17PM -0500, Garrett Wollman wrote: > < said: > > > I'll write wcstof() and wcstold() as wrappers around strtof() and > > strtold() and have them ready to commit along with your import > > of gdtoa. > > Is this really the right thing? No, it's the easy way of doing it. The alternative is to duplicate strtod(), change the argument types and call it wcstod(). I think this is what glibc does. NetBSD and Microsoft do it by converting to multibyte strings then calling strtod() (but NetBSD's tries to get too clever and can't convert NaN or Inf). > Is there a mbsto*() set of functions as well, or are the strto*() > functions supposed to be able to deal with that? No, there's no way to convert multibyte strings -> double without converting it to a wide character string first. > We are supposed, I believe, to support arbitrary national digits in > these functions, in addition to the Portable Character Set digits. I haven't checked this yet. I implemented this in wcstol(), wcstoul(), &c. but #ifdef'd it out before committing it. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message