"Craig A. Berry" <craigberry@mac.com> wrote: :So the following gets us to do the fake underflow as well as fake :overflow in the absence of IEEE math: : :--- numeric.c;-1 Fri Jun 7 16:40:25 2002 :+++ numeric.c Fri Jun 7 22:18:01 2002 :@@ -744,9 +744,8 @@ : * [1] Trying to establish a condition handler to trap floating point : * exceptions is not a good idea. */ : #if defined(VMS) && !defined(__IEEE_FP) && defined(NV_MAX_10_EXP) :- if (!negative && :- (log10(value) + exponent) >= (NV_MAX_10_EXP)) :- return NV_MAX; :+ if ((log10(value) + exponent) >= (NV_MAX_10_EXP)) :+ return negative ? 0.0 : NV_MAX; : #endif : : /* In UNICOS and in certain Cray models (such as T90) there is no :[end of patch] : :Someone with UNICOS access really ought to see whether the same thing :is necessary there, i.e., whether underflow as well as overflow needs to :be accounted for. It will go wrong in the same way, because we treat -ve exponents as +ve until the final divide. So it should be patched the same way. HugoThread Previous