XLISP tan

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference

# tan

Type: | - | function (subr)
Source: | - | xlmath.c

## Syntax

(tan expr)
  expr - floating point number or expression
  returns - the tangent of the number

## Description

The 'tan' function calculates the tangent of the 'expr' and returns the result. The 'expr' is in radians.

## Examples

    (tan 0.0)             ; returns 0
    (tan 1.0)             ; returns 1.55741
    (tan (/ 3.14159 2))   ; returns 753696
    (tan 2.0)             ; returns -2.18504
    (tan 3.0)             ; returns -0.142547
    (tan 3.14159)         ; returns -2.65359e-06
    (tan 4.5)             ; returns 4.63733

Common Lisp: Common Lisp allows for integer numbers, which XLISP does not support for 'tan'.

See the tan function in the XLISP 2.0 manual.

Back to Top

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference