Adding `cot` to functions

Added cot with the basic API.
Added unit tests to check functionality.