Craig A. Berry [Fri, 7 Jun 2002 18:29:31 +0000 (13:29 -0500)]
From: "Craig A. Berry" <craigberry@mac.com>
Message-Id: <
a05111b01b926db404884@[172.16.52.1]>
p4raw-id: //depot/perl@17074
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;