SIGN Function


Returns the sign of a value

Category: Mathematical

Syntax

SIGN ( argument )

Arguments

argument

  • is numeric.

Details

The SIGN function returns a value of

-1

if x < 0

if x = 0

1

if x > 0.

Examples

SAS Statements

Results

x=sign(-5);

-1

x=sign(5);

1

x=sign(0);




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net