Explain the following functions with an example.
Abs(), Cos(), Exp(), Rand(), Sin(), Sqrt(), Tan(), Mod(), Pi()
1. Abs() : Returns the absolute value
Example:Select abs(-32);
Output:32
2. Cos() : Returns the cosine of parameter given in radians
Example:Select cos(PI())
Output:-1
3. Exp() : Returns the base of natural algorithms (e) ^ x.
Example:Select EXP(2);
Output:7.3890560989307
4. Rand() : Returns a random (ad hoc) floating point value
Example:Select emp_id, RAND() from table_name;
5. Sin() : Returns the sine of parameter given in radians
Example:Select sin(PI())
Output:1.2246063538224e-16
6. Sqrt() : Returns the square root of a non negative integer
Example:Select sqrt(9)
Output:3
7. Tan() : Returns the tangent of parameter given in radians
Example:Select tan(PI())
Output:-1.2246063538224e-16
8. Mod() : Performs the modulo operation.Returns the remainder of N divided by M.
Example:Select mod(10,3)
Output:1
9. Pi() : Returns the value of p (pi).
Example:Select pi();
Output:3.141593