X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fatanl.c;h=3f8bda4c62391452acf9c48dd54ae8569510d943;hb=d2d412207bf7ceffe7ad8bdd29c8355ae3781258;hp=16c8dc12bf0fad59fa2ac93d3687ad2e18587ab6;hpb=e1123c2f4fedae90435426a82a05cf2e3233e97d;p=gnulib.git diff --git a/lib/atanl.c b/lib/atanl.c index 16c8dc12b..3f8bda4c6 100644 --- a/lib/atanl.c +++ b/lib/atanl.c @@ -64,6 +64,7 @@ * */ +#include "isnanl.h" /* arctan(k/8), k = 0, ..., 82 */ static const long double atantbl[84] = { @@ -178,12 +179,12 @@ atanl (long double x) int k, sign; long double t, u, p, q; - sign = x < 0.0; - /* Check for zero or NaN. */ - if (x != x || x == 0.0) + if (isnanl (x) || x == 0.0) return x + x; + sign = x < 0.0; + if (x + x == x) { /* Infinity. */