Re: 0 to a power
Raymond Toy <[email protected]> Mon, 04 Jan 2016 09:49:47 -0800
| Newsgroups | gmane.lisp.cmucl.general |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Raymond" == Raymond Toy <[email protected]> writes: Raymond> On Fri, Jan 1, 2016 at 7:51 AM, Matt Kaufmann <[email protected]> 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 _______________________________________________ cmucl-help mailing list [email protected] http://lists.zs64.net/mailman/listinfo/cmucl-help