These docs are for v2.0. Click to read the latest docs for v3.0.

Get the sign of an XFL enclosing number

Concepts

Behaviour

  • Return 1 if the XFL is negative, otherwise return 0

Definition

int64_t float_sign (
    int64_t float1
);

Example

int64_t sign =
    float_sign(float_one());

📘

Hint

The sign bit inside the XFL is the 0 when the XFL is negative, however this function follows the standard computing convention to return 1 if it is negative.

Parameters

NameTypeDescription
float1int64_tAn XFL floating point enclosing number

Return Code

TypeDescription
int64_tThe sign of the XFL:
0 if positive, 1 if negative.

If negative, an error:
INVALID_FLOAT
- the supplied parameter was not a valid XFL enclosing number