From owner-freebsd-standards Sat Mar 16 5:43:32 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id F1C0B37B400 for ; Sat, 16 Mar 2002 05:43:24 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id AAA02427; Sun, 17 Mar 2002 00:43:06 +1100 Date: Sun, 17 Mar 2002 00:44:43 +1100 (EST) From: Bruce Evans X-X-Sender: To: Tadayuki OKADA Cc: Tadayuki OKADA , Subject: Re: _MULTI_LIBM In-Reply-To: <3C922061.DD01E0B@windriver.com> Message-ID: <20020317001529.T30317-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 Fri, 15 Mar 2002, Tadayuki OKADA wrote: > Bruce Evans wrote: > > > It's not POSIX complient nor ANSI. > > > > It is now :-). C99 supports IEEE754, and doesn't require math functions > > to set errno. > In this respect, yes. But other portion of FreeBSD is not (yet), > so we can't say FreeBSD is C90 complient or C99. > > BTW, why don't we just define math_errhandling, MATH_ERRNO and > MATH_ERREXCEPT in math.h for POSIX complience for now? > Or are we waiting for fenv.h? I didn't know about math_errhandling, MATH_ERRNO or MATH_ERREXCEPT. They seem to be new in POSIX.1-2001 (they aren't in POSIX-1.1996 or C99). math_errhandling seems to be settable by the implemenation only. They are bugs in POSIX IMO. C99 got rid of the broken-as-designed requirement to set errno, but POSIX increased it (in practice). From POSIX-1.200x-draft7: 3861 APPLICATION USAGE 3862 On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling & 3863 MATH_ERREXCEPT) are independent of each other, but at least one of them must be non-zero. I'm not sure if the application can set math_handling. So, POSIX now gives the alternatives of MATH_ERRNO being set (this means that math functions must set errno for all types if "errors" (not just for range errors as required by C90)), or MATH_ERREXCEPT being set (this means that math functions must cause exceptions as not permitted by C9*, but as FreeBSD on i386's used to do). I'm certainly waiting for fenv.h :-). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message