[Edu-sig] Exponentiation should float
Bruce Sherwood
bas@andrew.cmu.edu
Tue, 15 Feb 2000 16:38:13 -0500
The problem is that exponentiation goes, well, exponential. So it is real
easy for this operation to give a result too large even for long integers.
A more general statement would be that if there is overflow on integer
exponentiation, the operation should be repeated with a floating result.
--On Tuesday, February 15, 2000, 1:34 PM -0600 Ka-Ping Yee <ping@lfw.org>
wrote:
> It doesn't have to go to floating-point because the answer can
> clearly be expressed as a whole number when the arguments are
> whole numbers. I think a better answer would be for it to go
> automatically to long integer. (There has been some discussion
> recently on the developer's list about unifying integers and
> long integers so that such promotion and demotion happens behind
> the scenes, and no one needs to ever worry about that pesky "L"
> suffix again. I think this would be very nice.)