aboutsummaryrefslogtreecommitdiff
path: root/src/OutputInfo.c
diff options
context:
space:
mode:
authorlanfer <lanfer@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2000-03-28 10:07:56 +0000
committerlanfer <lanfer@b589c3ab-70e8-4b4d-a09f-cba2dd200880>2000-03-28 10:07:56 +0000
commita07d61105110e817135fd778f2685edf6da74711 (patch)
tree25b543baa702b1ee22d1d1806b4aa0982b3cecec /src/OutputInfo.c
parent9e839730252b3ee974c86236d1ad522269222947 (diff)
changing to exponential notation for big numbers, no %g bc. that appears to be difficult to control
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@45 b589c3ab-70e8-4b4d-a09f-cba2dd200880
Diffstat (limited to 'src/OutputInfo.c')
-rw-r--r--src/OutputInfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/OutputInfo.c b/src/OutputInfo.c
index 8f2150f..2547aff 100644
--- a/src/OutputInfo.c
+++ b/src/OutputInfo.c
@@ -26,7 +26,8 @@ CCTK_REAL IOBasic_WriteInfo (cGH *GH, int index, const char *operator,
/* the number at which to switch from decimal to exp notation */
#define DECIMAL_PRECISION 1.0e-8
-#define USE_DECIMAL_NOTATION(x) ((fabs (x) > DECIMAL_PRECISION) || ((x) == 0.0))
+#define DECIMAL_TOOBIG 1.0e+8
+#define USE_DECIMAL_NOTATION(x) ((fabs (x) > DECIMAL_PRECISION) || ((x) == 0.0) || (fabs(x) < DECIMAL_TOOBIG))
/* static variables */
static int print_header = 0;