sec

From DavinciWiki
Jump to: navigation, search

Description

Computes the trigonometric secant of the input value.

Arguments and Return Values

Parameters: An array of any numeric data type or organization containing the values of angles in radians.

Return Value: A float array of the same organization as the input containing the secant of the input.

Usage

Syntax: sec(x)

'x' is any numeric array

This function just uses sec(x) = 1/cos(x)

Secant is undefined (infinite) for x = π/2 + n*π for any integer n; this function displays a divide by zero warning and returns zero in those cases

Return format is double if input is double; float otherwise

When sec() is entered without any arguments, it prints its description, as shown below.

Examples

dv> sec()

Secant
Hypotenuse length over adjacent leg length (in a right triangle)
sec(x) = 1/cos(x)
Works for arrays
S.Marshall 01-25-2008

0
dv> sec(-1//0//1)
3x1x1 array of float, bsq format [12 bytes]
1.85082 1.00000 1.85082

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 02-26-2008
Modified On: 02-26-2008

Personal tools