I changed the code related to the tangent addition formula