Update to c++ cosine function
Added c++ tangent function