From d4a4c5c81e422950141d5a9417f6421c22938fde Mon Sep 17 00:00:00 2001 From: stevenj Date: Thu, 15 Jul 2010 15:35:04 -0400 Subject: [PATCH] replace 1e20 with HUGE_VAL in ORIG_DIRECT code (silly hard-coded upper bound) darcs-hash:20100715193504-c8de0-bddb4c45a2839ae5fa41c56d5a6754411c646d1f.gz --- direct/DIRsubrout.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/direct/DIRsubrout.c b/direct/DIRsubrout.c index 79b094a..b5889a5 100644 --- a/direct/DIRsubrout.c +++ b/direct/DIRsubrout.c @@ -126,7 +126,7 @@ integer direct_dirgetlevel_(integer *pos, integer *length, integer *maxfunc, int length -= length_offset; /* Function Body */ - helplower = 1e20; + helplower = HUGE_VAL; helpgreater = 0.; k = 1; if (*ifeasiblef >= 1) { @@ -169,7 +169,7 @@ L12: /* L11: */ } for (j = *maxpos; j >= 1; --j) { - helplower = 1e20; + helplower = HUGE_VAL; helpgreater = 0.; j___ = s[j + s_dim1]; i__1 = j - 1; @@ -228,10 +228,6 @@ L12: } /* L31: */ } - if (helplower > 1e20 && helpgreater > 0.) { - helplower = helpgreater; - helpgreater += -1.; - } if (helpgreater <= helplower) { if (*cheat == 1 && helplower > *kmax) { helplower = *kmax; @@ -1194,7 +1190,7 @@ L50: c__ -= c_offset; /* Function Body */ - *minf = 1e20; + *minf = HUGE_VAL; costmin = *minf; /* JG 09/15/00 If Jones way of characterising rectangles is used, */ /* initialise thirds to reflect this. */ -- 2.30.2