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

Fix oflow bound in exp and pow. #604

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Conversation

blapie
Copy link
Collaborator

@blapie blapie commented Nov 28, 2024

Checklist

  • I have read the contributing guidelines.
  • I have considered portability of my change across platforms and architectures.
  • I have self-reviewed my code.
  • I have commented my code where necessary.
  • I have updated the documentation accordingly.
  • I have added tests that prove my fix is effective or that my feature works.

What is the purpose of this pull request?

  • Fix a bug and add tests

What changes did you make?

This PR consists in updating overflow threshold used in exp and pow.

Does this PR relate to any existing issue?

Fixes #523.
Relates to #600.

Issue shibatch#600 highlighted a limit of current
implementation where early overflow is noticed,
which diverges from the C99 standard.

This patch adds test to catch this type of cases.

It only checks a few points therefore we don't
know for sure if overflow occurs at the right time
but we know if something is wrong in the overflow
region.

Fix both scalar and simd implementation (double precision)

Fixes shibatch#523.
@blapie
Copy link
Collaborator Author

blapie commented Dec 3, 2024

Merging this PR. As it fixes both exp and pow. Will create a new issue for the pre-existing inaccuracies pointed out in pow.

@blapie blapie merged commit b997b2f into shibatch:master Dec 3, 2024
36 checks passed
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.

F64 exp returns infinity slightly too soon
1 participant