From 169daa11155988a210fac949297381743f3cb400 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 9 Dec 2025 23:14:53 +0100 Subject: feat: clang-tidy fixes --- lib/libm/csqrtl.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/libm/csqrtl.c') diff --git a/lib/libm/csqrtl.c b/lib/libm/csqrtl.c index 335e51d6..94bf52f1 100644 --- a/lib/libm/csqrtl.c +++ b/lib/libm/csqrtl.c @@ -1,6 +1,7 @@ -#include -#include -#include "__complex.h" +#include // for complex, I, cimagl, creall, csqrtl +#include // for LDBL_MAX +#include // for fabsl, copysignl, hypotl, sqrtl, isinf, INFINITY +#include // for bool, false, true #define THRESH (LDBL_MAX / 2.414213562373095048801688724209698L) #define cpackl(r, i) ((r) + (i) * (long double complex)I) @@ -31,8 +32,7 @@ long double complex csqrtl(long double complex z) */ if (signbit(a)) return (cpackl(fabsl(b - b), copysignl(a, b))); - else - return (cpackl(a, copysignl(b - b, b))); + return (cpackl(a, copysignl(b - b, b))); } /* * The remaining special case (b is NaN) is handled just fine by @@ -57,6 +57,5 @@ long double complex csqrtl(long double complex z) /* Rescale. */ if (scale) return (result * 2.0L); - else - return (result); + return (result); } -- cgit v1.2.3