Skip to content

Fix inaccuracies in hyperbolics: cosh(f) and sinh(f)

Pierre Blanchard requested to merge piebla01/fix-hyperbolics into main

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
  • Improve code quality or performance

What changes did you make?

These are fixes of similar nature as recent exponentials fixes. Early overflow/underflow was detected by users. Tests now are able to pick up such deviations from standard. Code is fixed to overflow/underflow when expected. These fixes incur performance variations, sometimes regressions, which is the price to pay to satisfy standard without rewriting the whole algorithm.

Does this PR relate to any existing issue?

Fixes issues reported on the upstream repository: https://github.com/shibatch/sleef/issues/364 https://github.com/shibatch/sleef/issues/460 https://github.com/shibatch/sleef/issues/461

Is there anything you would like reviewers to focus on?

This has been reviewed and tested internally.

Merge request reports

Loading