Skip to content

Fix clog2 function to be fast and universal#289

Open
GregoryMorse wants to merge 1 commit into
pymtl:masterfrom
GregoryMorse:patch-1
Open

Fix clog2 function to be fast and universal#289
GregoryMorse wants to merge 1 commit into
pymtl:masterfrom
GregoryMorse:patch-1

Conversation

@GregoryMorse
Copy link
Copy Markdown

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
Copy Markdown
Contributor

yo96 commented Jun 17, 2025

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

@cbatten
Copy link
Copy Markdown
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