diff options
author | Nicholas Clark <nick@ccl4.org> | 2001-10-26 23:52:17 +0100 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2001-10-26 21:22:23 +0000 |
commit | 0c2ee62afab77e7bf13679995a82b5f27324fef7 (patch) | |
tree | d9b1e2494d7780df605b84b6d2f8709050433e40 /pp.c | |
parent | c17f77a2b52ab64708c79333125bd73d16dd6485 (diff) | |
download | perl-0c2ee62afab77e7bf13679995a82b5f27324fef7.tar.gz |
tweak divide
Message-Id: <20011026225217.B20275@plum.flirble.org>
p4raw-id: //depot/perl@12700
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1074,9 +1074,13 @@ PP(pp_divide) #else /* Otherwise we only attempt it if either or both operands would not be preserved by an NV. If both fit in NVs - we fall through to the NV divide code below. */ - && ((left > ((UV)1 << NV_PRESERVES_UV_BITS)) - || (right > ((UV)1 << NV_PRESERVES_UV_BITS))) + we fall through to the NV divide code below. However, + as left >= right to ensure integer result here, we know that + we can skip the test on the right operand - right big + enough not to be preserved can't get here unless left is + also too big. */ + + && (left > ((UV)1 << NV_PRESERVES_UV_BITS)) #endif ) { /* Integer division can't overflow, but it can be imprecise. */ |