# Vector Arccosine

## Function Prototype

/* Vector Arccosine */
/* Type: simple */
/* Input arrays: 1    Options: 0    Output arrays: 1 */
/* Inputs: real */
/* Options: none */
/* Outputs: acos */
int ti_acos_start(TI_REAL const *options);
int ti_acos(int size,
TI_REAL const *const *inputs,
TI_REAL const *options,
TI_REAL *const *outputs);

## Description

This documentation is still a work in progress. It has omissions, and it probably has errors too. If you see any issues, or have any general feedback, please get in touch.

Vector Arccosine calculates the Trigonometric arccosine of each element in the input array.

$$acos_{t} = \arccos{input_{t}}$$

This is sometimes useful as a building block to more complex functions.

## Example Usage

### Calling From C

/* Example usage of Vector Arccosine */
/* Assuming that 'input' is a pre-loaded array of size 'in_size'. */
TI_REAL *inputs[] = {input};
TI_REAL options[] = {}; /* No options */
TI_REAL *outputs[1]; /* acos */

/* Determine how large the output size is for our options. */
const int out_size = in_size - ti_acos_start(options);

/* Allocate memory for output. */
outputs[0] = malloc(sizeof(TI_REAL) * out_size); assert(outputs[0] != 0); /* acos */

/* Run the actual calculation. */
const int ret = ti_acos(in_size, inputs, options, outputs);
assert(ret == TI_OKAY);


### Calling From Lua (with Tulip Chart bindings)

-- Example usage of Vector Arccosine
acos = ti.acos(input)


## Example Calculation

dateinputacos
2005-11-010.201.37
2005-11-020.301.27
2005-11-030.401.16
2005-11-040.301.27
2005-11-070.501.05
2005-11-080.700.80
2005-11-090.750.72
2005-11-100.900.45
2005-11-110.900.45
2005-11-141.000.00
2005-11-151.000.00
2005-11-160.201.37
2005-11-170.101.47
2005-11-18-0.101.67
2005-11-21-0.502.09

## Other Indicators

Previous indicator: Vector Absolute Value

Next indicator: Accumulation/Distribution Line

Random indicator: Relative Strength Index