From owner-freebsd-hackers Sun Jul 23 12:42:24 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id MAA10717 for hackers-outgoing; Sun, 23 Jul 1995 12:42:24 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id MAA10709 for ; Sun, 23 Jul 1995 12:42:16 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id FAA20837; Mon, 24 Jul 1995 05:38:50 +1000 Date: Mon, 24 Jul 1995 05:38:50 +1000 From: Bruce Evans Message-Id: <199507231938.FAA20837@godzilla.zeta.org.au> To: graichen@sirius.physik.fu-berlin.de, hackers@freebsd.org Subject: Re: man-pages ... Sender: hackers-owner@freebsd.org Precedence: bulk >i think we need some manpages for: >* matherr(3) - can somebody who knows how this function works write a page for >it (or maybe adapt a sun page) I'm surprised to see that we have it. It is currently broken (not even reachable). It allows you to replace the default error handling for the standard math functions by your own error handling. Unfortunately the default error handling forgets the correct (IEEE) return value and there is no reasonable way to recover. Forgetting the return value also breaks normal (IEEEish) error handling, e.g., acos(2.0) is 0 instead of NaN. The default error handling is actually unreachable because lib/msun is compiled with the wrong CFLAGS (should be CFLAGS += -D_POSIX_MODE). Math functions normally never return an error because in FreeBSD math errors normally generate a fatal SIGFPE. Bruce