Returns the sign of a value.

Syntax

Result = SRP_Math("SIGN", Value, "", DecimalPlaces, ScientificNotation)

Returns

The sign of Value.

Remarks

The SIGN operation returns the sign of Value. If Value is negative, then -1 is returned. If Value is positive and greater than zero, then 1 is returned. If Value is exactly equal to zero, then 0 is returned.

Example

// Get the sign of PI 
Val = "3.1415926535897932384626433832795" 
Result = SRP_Math("SIGN", Val) 
!! Result = 1 !! 
// Get the sign of -PI 
Val = "-3.1415926535897932384626433832795" 
Result = SRP_Math("SIGN", Val) 
!! Result = -1 !! 
// Get the sign of 0 
Result = SRP_Math("SIGN", 0) 
!! Result = 0 !!
  • No labels