This command is used to get the cosine conversion of a number.
value − The value as an input to the cosine function.
This method returns the cosine value of the inputed number.
/* Main program */ say cos(45)
When we run the above program we will get the following result.