Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2002 12:24:25 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Tadayuki OKADA <tadayuki.okada@windriver.com>
Cc:        Tadayuki OKADA <tokada@isi.com>, <standards@freebsd.org>
Subject:   Re: _MULTI_LIBM
Message-ID:  <20020317113138.E34997-100000@gamplex.bde.org>
In-Reply-To: <3C93C9C5.F085857A@windriver.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 16 Mar 2002, Tadayuki OKADA wrote:

> Bruce Evans wrote:
> > > 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?
> ...
> > They are bugs in POSIX IMO.  C99 got rid of the broken-as-designed
> > requirement to set errno, but POSIX increased it (in practice).
> No, new POSIX just requires one of 'errno' or 'exception' error handling
> must be present. You don't need to set 'errno', but then you have to
> have exception handling defined in <fenv.h>.
> I don't know if C99 mandates one of them to be present.

C99 permits both but requires neither.  Also, it specifies "exceptions"
more clearly -- math errors may raise exceptions by just setting an
exception flag; a SIGFPE for this is permitted but not required.  There
is no standard way to tell if you will get SIGFPE's.  I think POSIX
intends to say the same, but I couldn't find where it connects
"floating-point exception" with "SIGFPE".

> > 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).
> MATH_ERREXCEPT means you can use fp-exception facility
> defined in <fenv.h>, so it's not inconsistent with C99.

OK.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020317113138.E34997-100000>