]> git.ipfire.org Git - thirdparty/glibc.git/commit
math: Fix asin and acos invalid exception
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 13 Oct 2022 10:10:10 +0000 (11:10 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 13 Oct 2022 10:43:54 +0000 (11:43 +0100)
commit4ad4ea848b335d803bcf4754a1cea78f697eaec5
tree415fff2c47389cdbe5f40fe3c1820ac4530c0f9f
parentf660eb9cc7ddaed3900d0cb3b2468816790855ff
math: Fix asin and acos invalid exception

This works around a gcc issue where it const folds inf/inf into nan,
preventing the invalid exception signal to be raised.

(x-x)/(x-x) is more robust against optimizations and works for x==nan
too.

The issue should be fixed in gcc-11.3.0 and gcc-12, but glibc supports
older compilers.
sysdeps/ieee754/dbl-64/e_asin.c