Skip to content

Make (log x 0) return zero

Jeronimo Pellegrini requested to merge jpellegrini/clisp:log into master

In issue #38 I mentioned I wasn't able to provide a patch -- well, I just found the right place, and it was actually easier than what I had thought. I hope the patch is satisfactory.

The Common Lisp spec says that "If base is zero, log returns zero.", but Clisp was not checking for that, and would end up triggering a division by zero error when the base was zero.

This patch makes Clisp behave as per the standard. There are also some new tests included, and one test in alltests.tst was adjusted.

Merge request reports