chiark / gitweb /
use HUGE_VAL instead of 1e6 for "infinity" in DIRECT
authorstevenj <stevenj@alum.mit.edu>
Sat, 25 Aug 2007 19:43:42 +0000 (15:43 -0400)
committerstevenj <stevenj@alum.mit.edu>
Sat, 25 Aug 2007 19:43:42 +0000 (15:43 -0400)
darcs-hash:20070825194342-c8de0-af10ca4f976f39dd3897e612d4554d1b1c1488f1.gz

direct/DIRsubrout.c

index cdf0870b380625553790683ae02478026c1da428..c7743e138e8e55403661c0201af07ecc1e34f151 100644 (file)
@@ -577,7 +577,7 @@ L40:
 /* | is not close anymore (since the hyper rectangle surrounding the       | */
 /* | current point may have shrunk).                                       | */
 /* +-----------------------------------------------------------------------+ */
-           f[(i__ << 1) + 1] = 1e6f;
+           f[(i__ << 1) + 1] = HUGE_VAL;
            f[(i__ << 1) + 2] = 2.;
 /* +-----------------------------------------------------------------------+ */
 /* | Check if any feasible point is near this infeasible point.            | */
@@ -1248,7 +1248,7 @@ L50:
 /* 09/25/00 Added this */
 /*      if (f(1,1) .ge. 1.E+6) then */
     if (f[4] > 0.) {
-       f[3] = 1e6;
+       f[3] = HUGE_VAL;
        *fmax = f[3];
        *ifeasiblef = 1;
     } else {