System Message: SEVERE/4 (<string>
, line 1)
Title overline & underline mismatch.
==========================================================
Custom implementation of missing complex C99 functions
=========================================================
- begin repeat
- #type = npy_float, npy_double, npy_longdouble# #ctype = npy_cfloat,npy_cdouble,npy_clongdouble# c = f, , l# C = F, , L# #TMAX = FLT_MAX, DBL_MAX, LDBL_MAX#
r is nan
r is +- inf
x = +inf, y = +-inf | nan
x = -inf, y = nan | +i inf
Handle special cases.
<
raise invalid if b is not a NaN
<
return NaN + NaN i
csqrt(inf + NaN i) = inf + NaN i csqrt(inf + y i) = inf + 0 i csqrt(-inf + NaN i) = NaN +- inf i csqrt(-inf + y i) = 0 + inf i
The remaining special case (b is NaN) is handled just fine by the normal code path below.
Scale to avoid overflow.
Algorithm 312, CACM vol 10, Oct 1967.
Rescale.
References c, npy_cimag(), npy_copysign(), npy_cos(), npy_cpack(), npy_creal(), npy_exp(), npy_isfinite, npy_isnan, NPY_NAN, and npy_sin().