XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

sin


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

Syntax

(sin expr)
expr - floating point number or expression
returns - the sine of the number

Description

The 'sin' function returns the sine of the 'expr'. The 'expr' is in radians.

Examples

(sin 0.0)             ; returns 0
(sin .5)              ; returns 0.479426
(sin 1.0)             ; returns 0.841471
(sin (/ 3.14159 2))   ; returns 1
(sin 3.14159)         ; returns 2.65359e-06
(sin 0)               ; error: bad integer operation
(sin 1.)              ; error: bad integer operation

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

See the sin function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next