about summary refs log tree commit diff
path: root/sysdeps/wordsize-32/lldiv.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-13 11:10:10 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-17 08:18:52 +0100
commit7363a9a9a097c455a7ddb9386b4c6f7bdf91065f (patch)
tree8e11dcf8264bf1760830c82a0c086e828d8cab8b /sysdeps/wordsize-32/lldiv.c
parentbe066536bd313f1eec6e36fb92a96d39bf76f483 (diff)
downloadglibc-7363a9a9a097c455a7ddb9386b4c6f7bdf91065f.tar.gz
glibc-7363a9a9a097c455a7ddb9386b4c6f7bdf91065f.tar.xz
glibc-7363a9a9a097c455a7ddb9386b4c6f7bdf91065f.zip
math: Fix asin and acos invalid exception with old gcc
This works around a gcc issue where it const folded inf/inf into nan,
preventing the invalid exception to be signalled.

(x-x)/(x-x) is more robust against optimizations and works for all
out of bounds values including x==nan.

The gcc issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95115
should be fixed on release branches starting from gcc-10, but it is
better to change the code in case glibc is built with older gcc.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
Diffstat (limited to 'sysdeps/wordsize-32/lldiv.c')
0 files changed, 0 insertions, 0 deletions