Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gcompat gcompat
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Adélie Linux
  • gcompatgcompat
  • Merge requests
  • !8

Correct __*_finite math functions

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged George Matsumura requested to merge Gorg/gcompat:master into master Aug 08, 2020
  • Overview 0
  • Commits 1
  • Changes 1

This corrects a mistake in the finite math functions in which it was asserted that the return values had to be infinite, instead of the intended behavior of asserting that they were not infinite.

As an aside, I was wondering if the finite-assertions were necessary in these functions, as the compiler option in gcc which enables them simply states that this is an optimization that "can result in incorrect output". Therefore, I would assume that we are allowed to simply return garbage values if it isn't finite and skip the assertion. The specific details about this can be found under "-ffinite-math-only" entry here: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html I haven't removed the assertions in this change, but I can go ahead and do so if you would like me to.

Thank you for reading this and for creating such a nice library. If there is anything I did wrong, please let me know.

Edited Aug 08, 2020 by George Matsumura
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: master