Module Name:    src
Committed By:   drochner
Date:           Wed Jan 20 16:49:43 UTC 2010

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

Log Message:
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.13 -r1.14 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.13 src/lib/libm/src/k_standard.c:1.14
--- src/lib/libm/src/k_standard.c:1.13	Wed Jan 20 16:31:35 2010
+++ src/lib/libm/src/k_standard.c	Wed Jan 20 16:49:42 2010
@@ -12,7 +12,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_standard.c,v 1.13 2010/01/20 16:31:35 tnozaki Exp $");
+__RCSID("$NetBSD: k_standard.c,v 1.14 2010/01/20 16:49:42 drochner 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);
 		  }
@@ -119,9 +120,7 @@
 		exc.name = type < 100 ? "asin" : "asinf";
 		exc.retval = zero;
 		if(_LIB_VERSION == _POSIX_) {
-#ifndef __vax__
-		  exc.retval = NAN;
-#endif
+		  exc.retval = zero/zero;
 		  errno = EDOM;
 		} else if (!matherr(&exc)) {
 		  if(_LIB_VERSION == _SVID_) {
@@ -138,12 +137,9 @@
 		exc.type = DOMAIN;
 		exc.name = type < 100 ? "atan2" : "atan2f";
 		exc.retval = zero;
-		if(_LIB_VERSION == _POSIX_) {
-#ifndef __vax__
-		  exc.retval = NAN;
-#endif
+		if(_LIB_VERSION == _POSIX_)
 		  errno = EDOM;
-		} else if (!matherr(&exc)) {
+		else if (!matherr(&exc)) {
 		  if(_LIB_VERSION == _SVID_) {
 			(void) WRITE2("atan2: DOMAIN error\n", 20);
 		      }

Reply via email to