diff options
author | Craig A. Berry <craigberry@mac.com> | 2002-06-07 13:29:31 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-07 22:33:29 +0000 |
commit | 236f00125b5b7de76a7c2be98074844ba71dcf34 (patch) | |
tree | d6ef0572c66b8ec2c4669cdd76b72ed76d5a3c7a | |
parent | b2c077745916e1f642ef89dd7c457ec57893a358 (diff) | |
download | perl-236f00125b5b7de76a7c2be98074844ba71dcf34.tar.gz |
numeric.c:S_mulexp10 -- quit when you can
From: "Craig A. Berry" <craigberry@mac.com>
Message-Id: <a05111b01b926db404884@[172.16.52.1]>
p4raw-id: //depot/perl@17074
-rw-r--r-- | numeric.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -766,8 +766,11 @@ S_mulexp10(NV value, I32 exponent) if (exponent & bit) { exponent ^= bit; result *= power; + /* Floating point exceptions are supposed to be turned off, + * but if we're obviously done, don't risk another iteration. + */ + if (exponent == 0) break; } - /* Floating point exceptions are supposed to be turned off. */ power *= power; } return negative ? value / result : value * result; |