[goffice] Code cleanup.



commit 2c9f0fc3c5dded4e6d69b7f6662e1292afffc3df
Author: Morten Welinder <terra gnome org>
Date:   Sun May 9 12:23:49 2010 -0400

    Code cleanup.

 ChangeLog                    |    5 +++++
 goffice/math/go-regression.c |    7 ++-----
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cf3d81e..9c42352 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-09  Morten Welinder  <terra gnome org>
+
+	* goffice/math/go-regression.c (DOUBLE_MAX): Eliminate in favour
+	of SUFFIX(go_pinf).
+
 2010-05-07  Morten Welinder <terra gnome org>
 
 	* configure.in: Post-release bump.
diff --git a/goffice/math/go-regression.c b/goffice/math/go-regression.c
index c6c56b1..1c9ab00 100644
--- a/goffice/math/go-regression.c
+++ b/goffice/math/go-regression.c
@@ -21,7 +21,6 @@
 
 #define DEFINE_COMMON
 #define DOUBLE double
-#define DOUBLE_MAX DBL_MAX
 #define DOUBLE_MANT_DIG DBL_MANT_DIG
 #define SUFFIX(_n) _n
 #define FORMAT_g "g"
@@ -30,7 +29,6 @@
 #include "go-regression.c"
 #undef DEFINE_COMMON
 #undef DOUBLE
-#undef DOUBLE_MAX
 #undef DOUBLE_MANT_DIG
 #undef SUFFIX
 #undef FORMAT_g
@@ -38,7 +36,6 @@
 #include <sunmath.h>
 #endif
 #define DOUBLE long double
-#define DOUBLE_MAX LDBL_MAX
 #define DOUBLE_MANT_DIG LDBL_MANT_DIG
 #define SUFFIX(_n) _n ## l
 #define FORMAT_g "Lg"
@@ -185,7 +182,7 @@ SUFFIX(LUPDecomp) (DOUBLE **A, DOUBLE **LU, int *P, int n, DOUBLE *b_scaled,
 {
 	int i, j, k, tempint;
 	DOUBLE highest = 0;
-	DOUBLE lowest = DOUBLE_MAX;
+	DOUBLE lowest = SUFFIX(go_pinf);
 	DOUBLE cond;
 	DOUBLE det = 1;
 
@@ -253,7 +250,7 @@ SUFFIX(LUPDecomp) (DOUBLE **A, DOUBLE **LU, int *P, int n, DOUBLE *b_scaled,
 
 	cond = lowest > 0
 		? SUFFIX(log) (highest / lowest) / SUFFIX(log) (2)
-		: go_pinf;
+		: SUFFIX(go_pinf);
 
 #ifdef DEBUG_NEAR_SINGULAR
 	g_printerr ("cond=%.20" FORMAT_g "\n", cond);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]