SIN

From C64-Wiki
Jump to: navigation, search
BASIC keyword
Keyword: SIN
Abbreviation: S, Shift+I
Type: Function
Token code: 191/$BF
Handling routine
in BASIC ROM:
57963–58035
$E26B–E2B3
List of all BASIC keywords


Remark: This article describes the BASIC-Command SIN in BASIC V2 at the Commodore 64.

Type: Numeric Function
General Programming-Syntax: SIN(<numeric-expression>)

The numeric function SIN is a mathematical function which evaluates to the sine for a given angle, a number regarded as being in radians.

If the term given in the parentheses is non-numerical, the BASIC error ?TYPE MISMATCH ERROR occurs. Being a floating point argument, the term must be in the range of ±2.93873588·10−38 to ±1.70141183·1038. Exceeding these limits yields the BASIC error ?OVERFLOW ERROR. Omitting the numeric argument or to many arguments results in a ?SYNTAX ERROR.

Examples[edit]

PRINT SIN(1)

Output: 0.841470985


BASIC V2.0 (second release) Commands

ABS | AND | ASC | ATN | CHR$ | CLOSE | CLR | CMD | CONT | COS | DATA | DEF | DIM | END | EXP | FN | FOR | FRE | GET | GET# | GOSUB | GOTO | IF | INPUT | INPUT# | INT | LEFT$ | LEN | LET | LIST | LOAD | LOG | MID$ | NEW | NEXT | NOT | ON | OPEN | OR | PEEK | π  |POKE | POS | PRINT | PRINT# | READ | REM | RESTORE | RETURN | RIGHT$ | RND | RUN | SAVE | SGN | SIN | SPC | SQR | STATUS/ST | STEP | STOP | STR$ | SYS | TAB | TAN | THEN | TIME/TI | TIME$/TI$ | TO | USR | VAL | VERIFY | WAIT