Basic computer language commands

Basic computer programming language

SIN Function

Purpose:

To calculate the trigonometric sine of x, in radians.

Syntax:

SIN(x)

Comments:

SIN(x) is calculated in single-precision unless the /d switch is used when GW-BASIC is executed.

To obtain SIN(x) when x is in degrees, use SIN(x*π/180).

Examples:

PRINT SIN(1.5)
 .9974951

The sine of 1.5 radians is .9974951 (single-precision).

BASIC commands Main Menu

Index