/* 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
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>
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);
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);