]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - math/s_clog_template.c
math: Remove bogus math implementations
[thirdparty/glibc.git] / math / s_clog_template.c
index aa7f07a8ff14449a2e0e43c4eb149e8b3aa13ff8..0f95b24aa20da79a185abff59c07f8c7973e5f9c 100644 (file)
@@ -1,7 +1,6 @@
 /* Compute complex natural logarithm.
-   Copyright (C) 1997-2019 Free Software Foundation, Inc.
+   Copyright (C) 1997-2024 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -15,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <complex.h>
 #include <math.h>
@@ -33,7 +32,7 @@ M_DECL_FUNC (__clog) (CFLOAT x)
   if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
     {
       /* Real and imaginary part are 0.0.  */
-      __imag__ result = signbit (__real__ x) ? (FLOAT) M_MLIT (M_PI) : 0;
+      __imag__ result = signbit (__real__ x) ? M_MLIT (M_PI) : 0;
       __imag__ result = M_COPYSIGN (__imag__ result, __imag__ x);
       /* Yes, the following line raises an exception.  */
       __real__ result = -1 / M_FABS (__real__ x);
@@ -95,7 +94,7 @@ M_DECL_FUNC (__clog) (CFLOAT x)
       else
        {
          FLOAT d = M_HYPOT (absx, absy);
-         __real__ result = M_LOG (d) - scale * (FLOAT) M_MLIT (M_LN2);
+         __real__ result = M_LOG (d) - scale * M_MLIT (M_LN2);
        }
 
       __imag__ result = M_ATAN2 (__imag__ x, __real__ x);