cot

From DavinciWiki
Jump to: navigation, search

Description

Computes the trigonometric cotangent 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 cotangent of the input.

Usage

Syntax: cot(x)

'x' is any numeric array

This function just uses cot(x) = 1/tan(x); it will print a divide by zero warning (and return the correct value, 0) when x = 0

Cotangent is undefined (infinite) for x = n*π for any integer n; this function returns zero in those cases

Return format is double if input is double; float otherwise

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

Examples

dv> cot()

Cotangent
Adjacent leg length over opposite leg length (in a right triangle)
cot(x) = 1/tan(x) = cos(x)/sin(x)
Works for arrays
S.Marshall 01-25-2008

0
dv> cot(-1//0//1)
Division by zero, 1 times
3x1x1 array of float, bsq format [12 bytes]
-0.642093       0.00000 0.642093

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-20-2008
Modified On: 02-21-2008

Personal tools