]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math: use fabs on __ieee754_lgamma_r
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 17 Oct 2025 19:12:54 +0000 (16:12 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 21 Oct 2025 12:24:24 +0000 (09:24 -0300)
clang issues:

  ../sysdeps/ieee754/dbl-64/e_lgamma_r.c:234:29: error: absolute value function 'fabsf'
  given an argument of type 'double' but has parameter of type 'float' which may cause \
  truncation of value [-Werror,-Wabsolute-value]

It should not matter because the value is 0.0, but using fabs is
simpler than adding a warning suppresion.

Reviewed-by: Sam James <sam@gentoo.org>
sysdeps/ieee754/dbl-64/e_lgamma_r.c

index c298c8ca0344849e1f681dc39bde3c28557b8b4f..0b0c4e6f4cce7d7238ed5446c09c786eaa3c0ebb 100644 (file)
@@ -231,7 +231,7 @@ __ieee754_lgamma_r(double x, int *signgamp)
            if (x < -2.0 && x > -28.0)
                return __lgamma_neg (x, signgamp);
            t = sin_pi(x);
-           if(t==zero) return one/fabsf(t); /* -integer */
+           if(t==zero) return one/fabs(t); /* -integer */
            nadj = __ieee754_log(pi/fabs(t*x));
            if(t<zero) *signgamp = -1;
            x = -x;