summaryrefslogtreecommitdiff
path: root/lib/libm/src
diff options
context:
space:
mode:
authordrochner <drochner@NetBSD.org>2010-01-20 16:49:42 +0000
committerdrochner <drochner@NetBSD.org>2010-01-20 16:49:42 +0000
commite712404ece5d8e4f3e35d00d087bd009ce919a8d (patch)
treed9b9945ba87d07977e701de453119515904d6634 /lib/libm/src
parentefa2da50d8cb6e8edcba07f1fd99d24f9fb6ead6 (diff)
let the previous fix apply to acos rather than atan2,
and get rid of #ifdef vax
Diffstat (limited to 'lib/libm/src')
-rw-r--r--lib/libm/src/k_standard.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/libm/src/k_standard.c b/lib/libm/src/k_standard.c
index 80b6fa0f3b6..09f0d68a109 100644
--- a/lib/libm/src/k_standard.c
+++ b/lib/libm/src/k_standard.c
@@ -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);
}