Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm/src let log(<0) return NaN rather than -inf in POSI...
details: https://anonhg.NetBSD.org/src/rev/f198ba020c69
branches: trunk
changeset: 764107:f198ba020c69
user: drochner <drochner%NetBSD.org@localhost>
date: Mon Apr 11 15:17:33 2011 +0000
description:
let log(<0) return NaN rather than -inf in POSIX/XOPEN modes, as
requested in PR lib/41931 by Havard Eidnes (the PR refers to POSIX,
the OSF/1 manpage suggests that XOPEN should behave that way too)
being here, do the same to log10 and log2
diffstat:
lib/libm/src/k_standard.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (39 lines):
diff -r 64bcf5be9820 -r f198ba020c69 lib/libm/src/k_standard.c
--- a/lib/libm/src/k_standard.c Mon Apr 11 15:10:15 2011 +0000
+++ b/lib/libm/src/k_standard.c Mon Apr 11 15:17:33 2011 +0000
@@ -12,7 +12,7 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_standard.c,v 1.16 2010/09/01 10:44:28 drochner Exp $");
+__RCSID("$NetBSD: k_standard.c,v 1.17 2011/04/11 15:17:33 drochner Exp $");
#endif
#include "math.h"
@@ -370,7 +370,7 @@
if (_LIB_VERSION == _SVID_)
exc.retval = -HUGE;
else
- exc.retval = -HUGE_VAL;
+ exc.retval = zero/zero;
if (_LIB_VERSION == _POSIX_)
errno = EDOM;
else if (!matherr(&exc)) {
@@ -406,7 +406,7 @@
if (_LIB_VERSION == _SVID_)
exc.retval = -HUGE;
else
- exc.retval = -HUGE_VAL;
+ exc.retval = zero/zero;
if (_LIB_VERSION == _POSIX_)
errno = EDOM;
else if (!matherr(&exc)) {
@@ -800,7 +800,7 @@
if (_LIB_VERSION == _SVID_)
exc.retval = -HUGE;
else
- exc.retval = -HUGE_VAL;
+ exc.retval = zero/zero;
if (_LIB_VERSION == _POSIX_)
errno = EDOM;
else if (!matherr(&exc)) {
Home |
Main Index |
Thread Index |
Old Index