

def _fractional_power_superdiag_entry(l1, l2, t12, p):
    '\n    Compute a superdiagonal entry of a fractional matrix power.\n\n    This is Eq. (5.6) in [1]_.\n\n    Parameters\n    ----------\n    l1 : complex\n        A diagonal entry of the matrix.\n    l2 : complex\n        A diagonal entry of the matrix.\n    t12 : complex\n        A superdiagonal entry of the matrix.\n    p : float\n        A fractional power.\n\n    Returns\n    -------\n    f12 : complex\n        A superdiagonal entry of the fractional matrix power.\n\n    Notes\n    -----\n    Some amount of care has been taken to return a real number\n    if all of the inputs are real.\n\n    References\n    ----------\n    .. [1] Nicholas J. Higham and Lijing lin (2011)\n           "A Schur-Pade Algorithm for Fractional Powers of a Matrix."\n           SIAM Journal on Matrix Analysis and Applications,\n           32 (3). pp. 1056-1078. ISSN 0895-4798\n\n    '
    if (l1 == l2):
        f12 = ((t12 * p) * (l1 ** (p - 1)))
    elif ((abs(l1) < (abs(l2) / 2)) or (abs(l2) < (abs(l1) / 2))):
        f12 = ((t12 * ((l2 ** p) - (l1 ** p))) / (l2 - l1))
    else:
        z = ((l2 - l1) / (l2 + l1))
        log_l1 = np.log(l1)
        log_l2 = np.log(l2)
        arctanh_z = np.arctanh(z)
        tmp_a = (t12 * np.exp(((p / 2) * (log_l2 + log_l1))))
        tmp_u = _unwindk((log_l2 - log_l1))
        if l2:
            tmp_b = (p * (arctanh_z + ((np.pi * 1j) * tmp_u)))
        else:
            tmp_b = (p * arctanh_z)
        tmp_c = ((2 * np.sinh(tmp_b)) / (l2 - l1))
        f12 = (tmp_a * tmp_c)
    return f12

dataset/ETHPy150Open scipy/scipy/scipy/linalg/_matfuncs_inv_ssq.py _fractional_power_superdiag_entry/VarMisuse@198/586 `tmp_u`->`l2`