Added Cos function.