Documentation/Calc Functions/SIGN

From The Document Foundation Wiki
Jump to: navigation, search

Function name:

SIGN

Category:

Mathematical

Summary:

Returns the sign of a number.

Syntax:

SIGN(Number)

Returns:

Returns 1 if the number is positive, -1 if negative and 0 if zero.

Arguments:

Number is a real number or a reference to the cell containing that number whose sign is to be determined.

Additional details:

The GIF below illustrates the SIGN function.

SIGN function

Examples:

Formula Description Returns
=SIGN(3.4) positive number 1
=SIGN(-4.5) negative number -1
=SIGN(4-4) 0 value 0

Related LibreOffice functions:

ABS

ODF standard:

Section 6.16.54, part 2

Equivalent Excel functions:

SIGN