Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of log when a base is given #26

Open
moon-chilled opened this issue Jan 8, 2023 · 0 comments
Open

Implementation of log when a base is given #26

moon-chilled opened this issue Jan 8, 2023 · 0 comments

Comments

@moon-chilled
Copy link
Contributor

The spec says:

The two-argument logarithm function is defined as

(log base number)
== (/ (log number) (log base))

I think it should be clarified to say that this is the mathematical definition of the two-argument log (similar language is present for many other definitions, but not this one), but that an implementation is allowed the freedom to implement it differently. This interpretation is supported by:

The result of (log 8 2) may be either 3 or 3.0, depending on the implementation

Whereas cl (/ (log 8) (log 2)) can never be 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant