[cmucl-help] 0 to a power

Raymond Toy toy.raymond at gmail.com
Mon Jan 4 17:49:47 UTC 2016


>>>>> "Raymond" == Raymond Toy <toy.raymond at gmail.com> writes:

    Raymond> On Fri, Jan 1, 2016 at 7:51 AM, Matt Kaufmann <kaufmann at cs.utexas.edu>
    Raymond> wrote:

    >> Hi --
    >> 
    >> I'm seeing that evaluation of (expt 0 10001) results in an error, as
    >> does (expt 0 k) for any k above 10000 as far as I can tell.  Details
    >> are in the log below.  Interestingly, a base of 1 doesn't cause this
    >> problem; e.g., (expt 1 10000000000000000000000) evaluates to 1; so I
    >> wonder if the error with 0 could be avoided.
    >> 

    Raymond> Yeah we should probably shortcut to return 0 or signal divide-by-zero (or
    Raymond> something) for negative exponents.  At least for integer exponents and an
    Raymond> exact 0.

Done.  Available in the next snapshot coming real soon now.

--
Ray



More information about the cmucl-help mailing list