Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm/complex deal with infinity on the vax.
details: https://anonhg.NetBSD.org/src/rev/bc06742f5855
branches: trunk
changeset: 757749:bc06742f5855
user: christos <christos%NetBSD.org@localhost>
date: Mon Sep 20 17:51:38 2010 +0000
description:
deal with infinity on the vax.
diffstat:
lib/libm/complex/cproj.c | 8 ++++++--
lib/libm/complex/cprojf.c | 8 ++++++--
lib/libm/complex/cprojl.c | 8 ++++++--
3 files changed, 18 insertions(+), 6 deletions(-)
diffs (90 lines):
diff -r 9cfac79b5bb7 -r bc06742f5855 lib/libm/complex/cproj.c
--- a/lib/libm/complex/cproj.c Mon Sep 20 16:55:20 2010 +0000
+++ b/lib/libm/complex/cproj.c Mon Sep 20 17:51:38 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cproj.c,v 1.2 2010/09/20 16:53:30 christos Exp $ */
+/* $NetBSD: cproj.c,v 1.3 2010/09/20 17:51:38 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: cproj.c,v 1.2 2010/09/20 16:53:30 christos Exp $");
+__RCSID("$NetBSD: cproj.c,v 1.3 2010/09/20 17:51:38 christos Exp $");
#include <complex.h>
#include <math.h>
@@ -51,7 +51,11 @@
double_complex w = { .z = z };
if (isinf(creal(z) || isinf(cimag(z)))) {
+#ifdef __INFINITY
+ REAL_PART(w) = __INFINITY;
+#else
REAL_PART(w) = INFINITY;
+#endif
IMAG_PART(w) = copysign(0.0, cimag(z));
}
diff -r 9cfac79b5bb7 -r bc06742f5855 lib/libm/complex/cprojf.c
--- a/lib/libm/complex/cprojf.c Mon Sep 20 16:55:20 2010 +0000
+++ b/lib/libm/complex/cprojf.c Mon Sep 20 17:51:38 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cprojf.c,v 1.2 2010/09/20 16:53:30 christos Exp $ */
+/* $NetBSD: cprojf.c,v 1.3 2010/09/20 17:51:38 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: cprojf.c,v 1.2 2010/09/20 16:53:30 christos Exp $");
+__RCSID("$NetBSD: cprojf.c,v 1.3 2010/09/20 17:51:38 christos Exp $");
#include <complex.h>
#include <math.h>
@@ -52,7 +52,11 @@
float_complex w = { .z = z };
if (isinf(crealf(z) || isinf(cimagf(z)))) {
+#ifdef __INFINITY
+ REAL_PART(w) = __INFINITY;
+#else
REAL_PART(w) = INFINITY;
+#endif
IMAG_PART(w) = copysignf(0.0, cimagf(z));
}
diff -r 9cfac79b5bb7 -r bc06742f5855 lib/libm/complex/cprojl.c
--- a/lib/libm/complex/cprojl.c Mon Sep 20 16:55:20 2010 +0000
+++ b/lib/libm/complex/cprojl.c Mon Sep 20 17:51:38 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cprojl.c,v 1.3 2010/09/20 16:53:30 christos Exp $ */
+/* $NetBSD: cprojl.c,v 1.4 2010/09/20 17:51:38 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -26,7 +26,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: cprojl.c,v 1.3 2010/09/20 16:53:30 christos Exp $");
+__RCSID("$NetBSD: cprojl.c,v 1.4 2010/09/20 17:51:38 christos Exp $");
#include <complex.h>
#include <math.h>
@@ -51,7 +51,11 @@
long_double_complex w = { .z = z };
if (isinf(creall(z) || isinf(cimagl(z)))) {
+#ifdef __INFINITY
+ REAL_PART(w) = __INFINITY;
+#else
REAL_PART(w) = INFINITY;
+#endif
IMAG_PART(w) = copysignl(0.0, cimagl(z));
}
Home |
Main Index |
Thread Index |
Old Index