Documentation/Calc Functions/SEC

    From The Document Foundation Wiki
    Other languages:


    Function name:

    SEC

    Category:

    Mathematical

    Summary:

    Calculates the trigonometric secant (sec) of an angle expressed in radians.

    Syntax:

    SEC(Number)

    Returns:

    Returns a number that is the trigonometric secant of the specified angle. The value returned is a real number x, such that x ≤ -1 or x ≥ 1 (x cannot lie in the range (-1, 1)).

    Arguments:

    Number is a real number, or a reference to a cell containing that number, that is the angle in radians whose trigonometric secant is to be calculated.

    • If Number is non-numeric, then SEC reports a #VALUE! error.

    Additional details:

    If your angle is expressed in degrees, either multiply by PI()/180 or use the RADIANS function to convert to radians.

    The formula for the trigonometric secant of x is:

    [math]\displaystyle{ \sec(x)~=~\frac{1}{\cos(x)} }[/math]

    Mathematically, the secant of any odd multiple of π/2, i.e. {......-3π/2, -π/2, π/2, 3π/2.....} is undefined. However, because of the inherent inaccuracy in representing π numerically, SEC does not report errors for arguments close to these values. You should be aware that SEC will return large positive or negative results for odd multiples of π/2.

    The figure below illustrates the function SEC.

    SEC function

    Examples:

    Formula Description Returns
    =SEC(1) Trigonometric secant of 1 radian. 1.85081571768093
    =SEC(D1) where cell D1 contains the number -2. Trigonometric secant of -2 radians. −2.40299796172238
    =SEC(PI()/4) Trigonometric secant of π/4 radians. 1.4142135623731
    =SEC(RADIANS(60)) Trigonometric secant of 60°, after first converting the angle from degrees to radians. 2

    Related LibreOffice functions:

    COS

    COT

    CSC

    SIN

    TAN

    ODF standard:

    Section 6.16.52, part 2

    Related (or similar) Excel functions:

    SEC since v.2013.