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

Re: [PATCH] pp.c:pp_pow() -- quit when you're done

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
June 15, 2002 21:34
Subject:
Re: [PATCH] pp.c:pp_pow() -- quit when you're done
Message ID:
20020616073241.O3984@alpha.hut.fi
On Sat, Jun 15, 2002 at 06:56:12PM -0500, Craig A. Berry wrote:
> A for loop in pp_pow is constructed in such a way that it squares the 
> base again even after it's iterated through all the bits of the 
> exponent.  This could be a problem on any system where floating 
> overflow causes an exception; I noticed it with the D_FLOAT format on 
> OpenVMS Alpha, where it was causing Perl to blow up when running 
> p/op/pow.t.  The patch below fixes it by exiting the loop as soon as 
> we know we can.
> 
> If someone strongly objects to having this test inside the loop, I 
> can ifdef it.

Thanks, applied.  At least in UNICOS this shouldn't be necessary,
though, the Friday snapshot worked 100%.  May affect VOS.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous | Thread Next


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