Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2002 15:53:22 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Tadayuki OKADA <tokada@isi.com>
Cc:        <standards@FreeBSD.ORG>
Subject:   Re: _MULTI_LIBM
Message-ID:  <20020315153546.N22775-100000@gamplex.bde.org>
In-Reply-To: <3C90FDA0.E7280635@isi.com>

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

> Why is FreeBSD's mathlib compiled with -D_IEEE_LIBM,
> not -D_MULTI_LIBM?

Partly for historical reasons:

# RCS file: /home/ncvs/src/lib/msun/Makefile,v
# Working file: Makefile
# head: 1.28
# ...
# ----------------------------
# revision 1.12
# date: 1997/01/08 13:22:28;  author: wollman;  state: Exp;  lines: +2 -2
# Delete -D_POSIX_MODE and -D_MULTI_LIBM from CFLAGS.  They never had any effect
# because _IEEE_LIBM always takes priority, so the definition just served
# to confuse.
#
# Reviewed by:	bde
# ----------------------------

No one complained (at least loadly) about this, so the feature obviously
wasn't missed much.

Partly because _POSIX_MODE is incompletely and poorly implemented:
- most functions don't set errno as specified in C90.
- error handling usually degrades IEEE754'ness by replacing NaNs or
  perhaps even Infs by normal numbers.

Partly because compiling with _MULTI_LIBM pessimizes all modes.

> It's not POSIX complient nor ANSI.

It is now :-).  C99 supports IEEE754, and doesn't require math functions
to set errno.

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?20020315153546.N22775-100000>