The SEC function returns the secant of a number given in radians.

This function takes a single Number as input. It parses that number in radians and outputs its secant as a Number.


SEC(number) -> secant



number (required, type: Number)
The number to calculate the secant of. This number is parsed in radians.

Return Values

secant (type: Number)
The secant of the given number.


The following example returns the secant of 45. Note that while the secant of 45 degrees is √2, the tangent of 45 radians is 1.9035944074044246, and this is the number the SEC function returns:

SEC(45) -> 1.9035944074044246

In order to calculate the secant of a number of degrees, said number must first be converted into radians using the function RADIANS. The following example returns the secant of forty-five degrees by first converting forty-five degrees into radians and then calculating the secant of the resulting number. Note that the output is a numerical estimation of √2:

SEC(RADIANS(45)) -> 1.414213562373095

Mathematically, the secant of 90° approaches infinity. Due to the nature of numerical estimation, however, is not a number the SEC function will return. When the SEC function is used to calculate the secant of ninety degrees, as in the following example, it does not return infinity or undefined, but instead a large (but finite) number. This behavior matches that of most computational calculators and should be sufficient for most practical purposes:

SEC(RADIANS(90)) -> 16331239353195370


Mathematically, the secant of an angle is the reciprocal of the cosine of that angle. The relationship between the functions SEC and COS is the same, such that, for some number n:

SEC(n) = 1/COS(n)