Table of Contents

SIN

(Defined in TRIGONO.BAS)

The SIN() function returns the sine of the argument.

Function Header

DECLARE FUNCTION SIN AS FLOAT (x AS FLOAT) SHARED STATIC

Warning

You must include the TRIGONO.BAS library in your program to be able to access this function.

Examples

INCLUDE "trigono.bas"
PRINT SIN(0) ' outputs a number very close to zero, see the below note
PRINT SIN(0.785398) ' outputs .707704

Note

Trigonometric functions in XC=BASIC were designed to be fast rather than accurate. The result is accurate to 3 to 4 decimal digits (the error range is 0 to 0.0006). Please see this article for details.

See also