Module Name:    src
Committed By:   bouyer
Date:           Sat Jan 23 18:02:33 UTC 2010

Modified Files:
        src/lib/libm/src [netbsd-5]: k_standard.c

Log Message:
Pull up following revision(s) (requested by tnozaki in ticket #1261):
        lib/libm/src/k_standard.c: revision 1.13, 1.14
PR/42630 asin(2.0) and acos(2.0) doesn't return NaN.
reported by NARUSE, Yui -san, Thanks!
let the previous fix apply to acos rather than atan2,
and get rid of #ifdef vax


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.26.1 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.12 src/lib/libm/src/k_standard.c:1.12.26.1
--- src/lib/libm/src/k_standard.c:1.12	Thu Jul 21 16:58:39 2005
+++ src/lib/libm/src/k_standard.c	Sat Jan 23 18:02:33 2010
@@ -12,7 +12,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_standard.c,v 1.12 2005/07/21 16:58:39 christos Exp $");
+__RCSID("$NetBSD: k_standard.c,v 1.12.26.1 2010/01/23 18:02:33 bouyer Exp $");
 #endif
 
 #include "math.h"
@@ -103,9 +103,10 @@
 		exc.type = DOMAIN;
 		exc.name = type < 100 ? "acos" : "acosf";
 		exc.retval = zero;
-		if (_LIB_VERSION == _POSIX_)
+		if (_LIB_VERSION == _POSIX_) {
+		  exc.retval = zero/zero;
 		  errno = EDOM;
-		else if (!matherr(&exc)) {
+		} else if (!matherr(&exc)) {
 		  if(_LIB_VERSION == _SVID_) {
 		    (void) WRITE2("acos: DOMAIN error\n", 19);
 		  }
@@ -118,9 +119,10 @@
 		exc.type = DOMAIN;
 		exc.name = type < 100 ? "asin" : "asinf";
 		exc.retval = zero;
-		if(_LIB_VERSION == _POSIX_)
+		if(_LIB_VERSION == _POSIX_) {
+		  exc.retval = zero/zero;
 		  errno = EDOM;
-		else if (!matherr(&exc)) {
+		} else if (!matherr(&exc)) {
 		  if(_LIB_VERSION == _SVID_) {
 		    	(void) WRITE2("asin: DOMAIN error\n", 19);
 		  }

Reply via email to