summary refs log tree commit diff
path: root/bits/huge_valf.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-10-11 00:50:43 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-10-11 00:50:43 +0000
commit4d5940f0151241b73c6c0c1eb290462eb9c279b0 (patch)
treef0929fb2863a195e3052febb3d9504125cdb7391 /bits/huge_valf.h
parent352db0bd059df1ad2da5d22e6ea3fd3e4f2ce236 (diff)
downloadglibc-4d5940f0151241b73c6c0c1eb290462eb9c279b0.tar.gz
glibc-4d5940f0151241b73c6c0c1eb290462eb9c279b0.tar.xz
glibc-4d5940f0151241b73c6c0c1eb290462eb9c279b0.zip
Avoid M_NAN + M_NAN in complex functions.
Some libm complex functions have code that computes M_NAN + M_NAN.
This is nonsensical; it's just equivalent to M_NAN, since it's a quiet
NaN (and the comments suggesting this raises an exception are
similarly wrong).  This patch changes the code just to use M_NAN (and
removes the bogus comments).  (Preferably, code should either
propagate an input NaN or do a computation that raises "invalid" and
generates a default NaN at the same time.  There are various cases,
however, that currently raise "invalid" even for NaN inputs; I think
those are cases where "invalid" is optional in ISO C so a change to
whether it's raised would be OK, but they would still need more
careful consideration than the cases where such issues do not arise.)

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	* math/s_ccosh_template.c (M_DECL_FUNC (__ccosh)): Use M_NAN
	instead of M_NAN + M_NAN.
	* math/s_csinh_template.c (M_DECL_FUNC (__csinh)): Likewise.
Diffstat (limited to 'bits/huge_valf.h')
0 files changed, 0 insertions, 0 deletions