On Dec 21, 2012, at 11:02 PM, Thomas Pfau <tfp...@gmail.com> wrote:

> CC/DECC/NOANSI_ALIAS 
> /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/float=ieee/ieee=denorm/NAMES=(AS_IS,SHORTENED)/Def
> ine=(PERL_CORE,_USE_STD_STAT=1) NUMERIC.C
> 
>             return NV_MAX;
> ...................^
> In this statement, floating-point overflow occurs in evaluating the 
> expression "1.189731495357231765085759326628007016196477e4932l".
> at line number 810 in file DISK$USERS:[pfau.FREEWARE.perl-5_16_2]numeric.c;1
> Error status %X10B91260 occurred when updating target NUMERIC.OBJ

This is a bug that goes back to 
<http://perl5.git.perl.org/perl.git/commit/67597c89125e7e144f9ba60f5b1fe23b951286d8?f=numeric.c>
 eleven years ago.  We misspelled _IEEE_FP (which is what the compiler defines) 
as __IEEE_FP, with an extra leading underscore.  So code that was intended as a 
workaround in overflow handling for folks who had D_FLOAT or G_FLOAT has in 
fact been always included on VMS.  It compiles without error except when 
configuring with 64-bit integers but without long doubles.

This should fix it:

--- numeric.c;-0        Thu Oct 25 21:44:15 2012
+++ numeric.c   Sat Dec 22 08:45:46 2012
@@ -803,7 +803,7 @@ S_mulexp10(NV value, I32 exponent)
      * a hammer.  Therefore we need to catch potential overflows before
      * it's too late. */
 
-#if ((defined(VMS) && !defined(__IEEE_FP)) || defined(_UNICOS)) && 
defined(NV_MAX_10_EXP)
+#if ((defined(VMS) && !defined(_IEEE_FP)) || defined(_UNICOS)) && 
defined(NV_MAX_10_EXP)
     STMT_START {
        const NV exp_v = log10(value);
        if (exponent >= NV_MAX_10_EXP || exponent + exp_v >= NV_MAX_10_EXP)

________________________________________
Craig A. Berry
mailto:craigbe...@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to