Correct __*_finite math functions

George Matsumura requested to merge Gorg/gcompat:master into master

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: 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 by George Matsumura

Merge request reports