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

Negate an XFL floating point number

Concepts

Behaviour

  • Multiply an XFL by -1
  • Return a new XFL as an int64_t

Definition

int64_t float_negate (
    int64_t float1
);

Example

int64_t negative_one =
    float_negate(float_one());

📘

Special case

The negation of Canonical Zero is Canonical Zero. Unlike some floating point standards (such as IEEE) there is no "negative zero" in XFL.

Parameters

NameTypeDescription
float1int64_tAn XFL floating point enclosing number

Return Code

TypeDescription
int64_tThe XFL (xls17) enclosing number

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