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

Log and log1p support #16

Open
touisteur opened this issue Sep 1, 2021 · 1 comment
Open

Log and log1p support #16

touisteur opened this issue Sep 1, 2021 · 1 comment

Comments

@touisteur
Copy link

Hi,

Reading through the code, searching w/ github, I couldn't locate an implementation of log or log1p. Did I miss something? Is support for those foreseen some day? Is there a trick I'm missing here?

Thanks in advance for your help.

@sethtroisi
Copy link
Contributor

If you are looking for integer log you can approximate it with clz

truncate(log2(n)) = BITS - clz(N) - 1

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

2 participants