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

add cossin LUT #197

Merged
merged 2 commits into from
Dec 10, 2020
Merged

add cossin LUT #197

merged 2 commits into from
Dec 10, 2020

Conversation

matthuszagh
Copy link
Contributor

@matthuszagh matthuszagh commented Dec 9, 2020

Implements a fast cossin computation using an 8-bit LUT. This achieves better than 0.9LSB maximum error for 16-bit output. It uses a 20-bit integer phase input and produces 18-bit integer outputs.

Considerations

  • There appears to be a small phase offset/bias since the error produces an oscillatory pattern. However, the performance/accuracy appear to be good enough so this shouldn't present a problem. A plot of the error values as a function of phase is shown below.

err

  • It may make sense to make shift_round integer-generic. I believe the easiest way to do this would be to add a dependency on num.

Related

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