def _compute_newton_step(lambdas, p_norm, w_norm):
    """Compute the Newton step.

    Args:
        lambdas (namedtuple): Named tuple containing the current candidate
            value for the damping factor lambda, its lower bound and upper bound.
        p_norm (float): Frobenius (i.e. L2-norm) of the candidate vector.
        w_norm (float): Frobenius (i.e. L2-norm) of vector w, which is the solution
            to the following triangular system: U.T w = p.

    Returns:
        (float): Newton step computed according to formula (4.44) p.87
            from Nocedal and Wright (2006).
    """
    return lambdas.candidate + (p_norm / w_norm) ** 2 * (p_norm - 1)