Module Name:    src
Committed By:   drochner
Date:           Mon Apr 11 15:17:34 UTC 2011

Modified Files:
        src/lib/libm/src: k_standard.c

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libm/src/k_standard.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/src/k_standard.c
diff -u src/lib/libm/src/k_standard.c:1.16 src/lib/libm/src/k_standard.c:1.17
--- src/lib/libm/src/k_standard.c:1.16	Wed Sep  1 10:44:28 2010
+++ src/lib/libm/src/k_standard.c	Mon Apr 11 15:17:33 2011
@@ -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)) {

Reply via email to