output1 = `static Py_complex
cmath_asinh_impl(PyObject *module, Py_complex z)
/*[clinic end generated code: output=733d8107841a7599 input=5c09448fcfc89a79]*/
/*last modified Jan 2024*/
{
Py_complex s1, s2, r;
SPECIAL_VALUE(z, asinh_special_values);
if (fabs(z.real) > CM_LARGE_DOUBLE || fabs(z.imag) > CM_LARGE_DOUBLE) {
if (z.imag >= 0.) {
r.real = copysign(<1>log(hypot(z.real/2., z.imag/2.)) +
M_LN2*2.</1>, z.real);
} else {
r.real = -copysign(log(hypot(z.real/2., z.imag/2.)) +
M_LN2*2., -z.real);
}
r.imag = atan2(z.imag, fabs(z.real));
} else {
s1.real = 1.+z.imag;
s1.imag = -z.real;
s1 = cmath_sqrt_impl(module, s1);
s2.real = 1.-z.imag;
s2.imag = z.real;
s2 = cmath_sqrt_impl(module, s2);
r.real = asinh(s1.real*s2.imag-s2.real*s1.imag);
r.imag = atan2(z.imag, s1.real*s2.real-s1.imag*s2.imag);
}
errno = 0;
return r;
}
END UPDATED FILE`