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.

### Declaration

``````SEC(number) -> secant
``````

### Parameters

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.

### Examples

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
``````

### Discussion

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)
``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.81097114,"math_prob":0.9907254,"size":1733,"snap":"2023-40-2023-50","text_gpt3_token_len":410,"char_repetition_ratio":0.17871602,"word_repetition_ratio":0.03663004,"special_character_ratio":0.24927871,"punctuation_ratio":0.10903427,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99962723,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-29T21:30:55Z\",\"WARC-Record-ID\":\"<urn:uuid:e0a4e9ce-9663-4838-8fc5-9d532bdd6241>\",\"Content-Length\":\"998338\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3ffa70bf-dc40-4b7e-9dd4-ff155c13fbb6>\",\"WARC-Concurrent-To\":\"<urn:uuid:7abd9f49-1ad7-488a-b08e-95be023e2cd7>\",\"WARC-IP-Address\":\"104.16.242.118\",\"WARC-Target-URI\":\"https://support.airkit.com/reference/sec\",\"WARC-Payload-Digest\":\"sha1:3EE4SIAAENVIB2C7YHXDMSDYG2DQGJGO\",\"WARC-Block-Digest\":\"sha1:ULK5GELPY6QH6EU6KVSTGC4PXRWEMBOG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233510528.86_warc_CC-MAIN-20230929190403-20230929220403-00080.warc.gz\"}"}