SEC
Last updated
Was this helpful?
Last updated
Was this helpful?
The SEC function returns the secant of a number given in radians.
This function takes a single as input. It parses that number in radians and outputs its secant as a Number.
number (required, type: Number) The number to calculate the secant of. This number is parsed in radians.
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:
In order to calculate the secant of a number of degrees, said number must first be converted into radians using the function . 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:
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:
Mathematically, the secant of an angle is the reciprocal of the cosine of that angle. The relationship between the functions SEC and is the same, such that, for some number n: