The SEC function in Google Sheets is a trigonometric function that returns the secant of a given angle. The secant function is defined as the reciprocal of the cosine function, making it useful for various calculations in math and engineering, especially in relation to angles and their properties within circles.
Syntax
SEC(angle)
- angle: This is the angle in radians for which the secant is to be calculated.
Example #1
SEC(1)
This function call calculates the secant of an angle of 1 radian. The result is approximately 1.8508.
Example #2
SEC(0.5)
Here, the SEC function computes the secant of 0.5 radians. The result is about 1.1399.
Example #3
SEC(PI()/4)
This call evaluates the secant of 45 degrees, or PI/4 radians, yielding a result of approximately 1.4142.
Error handling
- NUM!: This error occurs if the angle provided is such that the cosine is zero, leading to an undefined secant value.
- VALUE!: This error appears if the argument given is not a numeric value, meaning the function cannot perform the calculation.
- DIV/0!: This error signifies a mathematical division by zero, occurring when the cosine of the angle equals zero.