def cosarctan(x):
    """Calculates the trigonometric function: Cos(Arctan(x)) by simplifying
    to (x^2+1)^-0.5. This function is meant to provide an improvement in 
    speed over long iterations"""
    return (x ** 2 + 1) ** -0.5
