kytschBASIC

Put down that phone!
Please view me on real computer.

SGN

Return the sign of a number.

Example

PRINT SGN(-250)

LINE BREAK

PRINT SGN(0)

LINE BREAK

DEF var%=SGN(250)

PRINT var%

Output

-1
0
1

See also

ABS  | ACOS  | ASIN  | ATAN  | BIN  | COS  | EXP  | FRAC  | HCOS  | HEX  | HSIN  | HTAN  | LOG  | LOG10  | RND  | SIN  | SQR  | TAN