Skip to content

Add hardware-accurate QEXP and QLOG #490

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

Merged
merged 3 commits into from
Jun 10, 2025

Conversation

Wuerfel21
Copy link
Contributor

Current QLOG and QEXP constant evaluation is based on libm floating-point functions, so may cause inconsistency between host systems. I think there was a problem with QLOG 0, but other values are usually only off by a few LSBs, which speaks to the quality of both the glibc math library and the P2 hardware. The implementation is derived from PNut source, though that isn't accurate either (rounding bug in QEXP).

Bonus: add a missing header definition for log2.

@totalspectrum totalspectrum merged commit b382e42 into totalspectrum:master Jun 10, 2025
5 checks passed
@totalspectrum
Copy link
Owner

Thank you, Ada!

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.

2 participants