let the previous fix apply to acos rather than atan2,

and get rid of #ifdef vax
This commit is contained in:
drochner 2010-01-20 16:49:42 +00:00
parent efa2da50d8
commit e712404ece
1 changed files with 7 additions and 11 deletions

View File

@ -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 @@ __kernel_standard(double x, double y, int type)
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 @@ __kernel_standard(double x, double y, int type)
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 @@ __kernel_standard(double x, double y, int type)
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);
}