Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libm/src let the previous fix apply to acos rather than ...



details:   https://anonhg.NetBSD.org/src/rev/56b82ca06f3d
branches:  trunk
changeset: 750985:56b82ca06f3d
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Jan 20 16:49:42 2010 +0000

description:
let the previous fix apply to acos rather than atan2,
and get rid of #ifdef vax

diffstat:

 lib/libm/src/k_standard.c |  18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diffs (51 lines):

diff -r b1a053b9ea30 -r 56b82ca06f3d lib/libm/src/k_standard.c
--- a/lib/libm/src/k_standard.c Wed Jan 20 16:36:55 2010 +0000
+++ b/lib/libm/src/k_standard.c Wed Jan 20 16:49:42 2010 +0000
@@ -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);
                      }



Home | Main Index | Thread Index | Old Index