summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2000-05-10 09:25:11 +0000
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2000-05-10 09:25:11 +0000
commit7235ee58f5dbe7c3971a3553bbdc1027f3d41b54 (patch)
tree3e69e642b330913451ea9058d2490bb71c2f207f
parent7bbe9dee9e3877e7b053c4b437a8e04a6b04ed1d (diff)
downloadguile-7235ee58f5dbe7c3971a3553bbdc1027f3d41b54.tar.gz
IS_INF: Undid last change.
-rw-r--r--libguile/ChangeLog8
-rw-r--r--libguile/numbers.c3
2 files changed, 9 insertions, 2 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 81c4ad31f..602f1fc92 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,3 +1,11 @@
+2000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * numbers.c: No need to include unif.h.
+
+ (IS_INF): Returned to old test for now: x == x + 1 will not work
+ for large numbers due to rounding errors.
+ Thanks to Kalle Olavi Niemitalo.
+
2000-05-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
* numbers.c (scm_divbigdig): Removed outdated comment.
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 5fa35f825..bd40ae670 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -47,7 +47,6 @@
#include <stdio.h>
#include <math.h>
#include "libguile/_scm.h"
-#include "libguile/unif.h"
#include "libguile/feature.h"
#include "libguile/ports.h"
#include "libguile/root.h"
@@ -74,7 +73,7 @@ static SCM scm_divbigint (SCM x, long z, int sgn, int mode);
/* IS_INF tests its floating point number for infiniteness
*/
#ifndef IS_INF
-#define IS_INF(x) ((x) == (x) + 1)
+#define IS_INF(x) ((x) == (x) / 2)
#endif
/* Return true if X is not infinite and is not a NaN