Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Latest commit

 

History

History
73 lines (60 loc) · 1.86 KB

SGN.org

File metadata and controls

73 lines (60 loc) · 1.86 KB

Top | Up (Math) | < Previous (ABS) | Next (MIN) >

SGN

Returns the sign of a number (-1, 0, or 1).

Syntax

SGN number# OUT sign%
parameterdescription
number#The number to get the sign of
outputdescription
sign%The sign of number# (-1, 0, or 1)
numberssign
positive1
negative-1
00
-00
infinity1
-infinity-1
NaN1

Examples

PRINT SGN(10) '1
PRINT SGN(-EXP(999)) '-1

Top | Up (Math) | < Previous (ABS) | Next (MIN) >