develooper Front page | perl.vmsperl | Postings from June 2002

Re: [PATCH #2] Re: [PATCH] numeric.c:S_mulexp10 -- quit when you can

Thread Previous
From:
Hugo van der Sanden
Date:
June 9, 2002 07:10
Subject:
Re: [PATCH #2] Re: [PATCH] numeric.c:S_mulexp10 -- quit when you can
Message ID:
200206091352.g59Dq7Z28403@crypt.compulink.co.uk
"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.

Hugo

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About