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

[C++] Implement logarithm compute functions #28801

Closed
asfimport opened this issue Jun 16, 2021 · 3 comments
Closed

[C++] Implement logarithm compute functions #28801

asfimport opened this issue Jun 16, 2021 · 3 comments

Comments

@asfimport
Copy link
Collaborator

asfimport commented Jun 16, 2021

ln, log, log2?

Reporter: David Li / @lidavidm
Assignee: David Li / @lidavidm

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-13096. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Eduardo Ponce / @edponce:
I consider having (1) ln, (2) log10, and (3) log2 is a good starting point, and the missing variants are:
(4) log(x, base) = log(x) / log(base), note that log(base) is a constant w.r.t. to Datum x so optimizations can be made
(5) log1p(x) = log(1+x)

Note that (4) is the most general variant as it can represent any of the other variants, so it might be worthwhile to consider adding it to Arrow.

As additional context, here is the partial landscape of log functions across library/languages:

@asfimport
Copy link
Collaborator Author

David Li / @lidavidm:
Thanks for looking all these over. I think we can add #5 easily. For #4, would we pass the log base as a kernel option? Or as another argument? (We'd only be able to optimize in the former case, I guess, unless we required a scalar argument)

@asfimport
Copy link
Collaborator Author

yibocai#1:
Issue resolved by pull request 10567
#10567

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

No branches or pull requests

2 participants