[go: up one dir, main page]

Skip to content

Make (log x 0) return 0 (as per the spec)

The CL spec says that "If base is zero, log returns zero." But ECL was not checking for zero, so a divide by zero error was generated. This patch makes it return zero when the base is zero:

> (log  1 0)

0
> (log 1/2 0)

0
> (log #C(2 1) 0)

0
> (log 2 0.0)

0

Would you want me to also provide tests? I'm not sure in which of the test files it'd go, that's why I didn't include any.

Merge request reports

Loading