def np_complex_asinh_impl(context, builder, sig, args):
    # npymath does not provide a complex atan. The code in funcs.inc.src
    # is translated here...
    _check_arity_and_homogeneity(sig, args, 1)

    ty = sig.args[0]
    float_ty = ty.underlying_float
    epsilon = context.get_constant(float_ty, 1e-3)

    # if real or imag has magnitude over 1e-3...
    x = context.make_complex(builder, ty, value=args[0])
    out = context.make_complex(builder, ty)
    abs_r = _fabs(context, builder, x.real)
    abs_i = _fabs(context, builder, x.imag)
    abs_r_gt_epsilon = builder.fcmp(lc.FCMP_OGT, abs_r, epsilon)
    abs_i_gt_epsilon = builder.fcmp(lc.FCMP_OGT, abs_i, epsilon)
    any_gt_epsilon = builder.or_(abs_r_gt_epsilon, abs_i_gt_epsilon)
    binary_sig = typing.signature(*[ty]*3)
    with builder.if_else(any_gt_epsilon) as (then, otherwise):
        with then:
            # ... then use formula
            # log(sqrt(1+sqr(x)) + x)
            ONE = context.get_constant_generic(builder, ty, 1.0 + 0.0j)
            xx = np_complex_square_impl(context, builder, sig, args)
            one_plus_xx = numbers.complex_add_impl(context, builder,
                                                    binary_sig, [ONE, xx])
            sqrt_res = np_complex_sqrt_impl(context, builder, sig,
                                            [one_plus_xx])
            log_arg = numbers.complex_add_impl(context, builder,
                                                binary_sig, [sqrt_res, args[0]])
            res = np_complex_log_impl(context, builder, sig, [log_arg])
            out._setvalue(res)
        with otherwise:
            # else use series expansion (to avoid loss of precision)
            coef_dict = {
                types.complex64: [-1.0/6.0, -9.0/20.0],
                types.complex128: [-1.0/6.0, -9.0/20.0, 42.0/-25.0],
                # types.complex256: [-1.0/6.0, -9.0/20.0, -25.0/42.0, -49.0/72.0, -81.0/110.0]
            }

            xx = np_complex_square_impl(context, builder, sig, args)
            ONE = context.get_constant_generic(builder, ty, 1.0 + 0.0j)
            tmp = _complex_expand_series(context, builder, ty,
                                         ONE, xx, coef_dict[ty])
            out._setvalue(numbers.complex_mul_impl(context, builder,
                                                    binary_sig,
                                                    [args[0], tmp]))

    return out._getvalue()


########################################################################
# NumPy acosh
dataset/ETHPy150Open numba/numba/numba/targets/npyfuncs.py/np_complex_asinh_impl/swapped operands of `/`