Skip to content

Fix clog2 function to be fast and universal #289

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GregoryMorse
Copy link

Using floor of log2 with IEEE double floats here, suffers slowness and inaccuracy at huge values where the log2 would round incorrectly due a 53-bit mantissa.

Using floor of log2 with IEEE double floats here, suffers slowness and inaccuracy at huge values where the log2 would round incorrectly due a 53-bit mantissa.
@yo96
Copy link
Contributor

yo96 commented Jun 17, 2025

Thank you for the PR! The change looks good to me.

@cbatten
Copy link
Contributor

cbatten commented Jun 18, 2025

@yo96 feel free to merge if you think it is good!

@cbatten cbatten requested a review from yo96 June 18, 2025 00:51
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

Successfully merging this pull request may close these issues.

3 participants