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 low accuracy sin, cos, log2, exp2 and pow #229

Merged
merged 9 commits into from Mar 12, 2019
Merged

Conversation

@shibatch
Copy link
Owner

@shibatch shibatch commented Oct 28, 2018

I added the following functions.

  • fastsinf_u3500
  • fastcosf_u3500
  • fastpowf_u3500
  • log2_u35, log2f_u35
  • exp2_u35, exp2f_u35

The error bound of fastsin and fastcos are max(2e-6, 350ULPs).
Each function has corresponding deterministic functions.

@xoofx Please let me know how you think about these functions.

@shibatch shibatch requested review from fpetrogalli and xoofx Oct 28, 2018
@xoofx
Copy link
Collaborator

@xoofx xoofx commented Oct 28, 2018

Amazing, will have a look, thanks!

@shibatch
Copy link
Owner Author

@shibatch shibatch commented Oct 28, 2018

Testing at Travis is failing because brew is trying to build gcc from its source code.

@fpetrogalli
Copy link
Collaborator

@fpetrogalli fpetrogalli commented Nov 1, 2018

Why introduce the fast prefix in the names?

@shibatch
Copy link
Owner Author

@shibatch shibatch commented Nov 1, 2018

Because the error bound is not only specified by ULP value.
The fast trig functions sometimes returns values higher than 1.
The pow function tends to underflow easily.
So, they are pretty sloppy functions.

@fpetrogalli
Copy link
Collaborator

@fpetrogalli fpetrogalli commented Nov 2, 2018

Testing at Travis is failing because brew is trying to build gcc from its source code.

Is this something that is broken also on master? If so, I think we should fix master first...

@shibatch
Copy link
Owner Author

@shibatch shibatch commented Nov 3, 2018

I am hoping that this "problem" will be fixed at brew side.
Otherwise, we need to change the CI setting, of course.

@shibatch shibatch mentioned this pull request Dec 3, 2018
xoofx
xoofx approved these changes Mar 6, 2019
@shibatch shibatch merged commit a77ba9e into master Mar 12, 2019
6 checks passed
6 checks passed
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@shibatch
continuous-integration/jenkins/branch This commit looks good
Details
@shibatch
continuous-integration/jenkins/pr-merge This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@shibatch shibatch deleted the Add_lowprec_sin_cos branch Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants