Set the exponent of an XFL enclosing number

🚧

Warning

This function is used to directly manipulate XFL numbers, however in most cases you will want to use float_set instead

Concepts

Behaviour

  • Return the new XFL as int64_t

Definition

int64_t float_exponent_set (
    int64_t float1,
    int32_t exponent
);

Example

int64_t new_xfl = 
    float_exponent_set(old_xfl, -71);

📘

Hint

Exponent must be between -96 and 80

Parameters

Name

Type

Description

float1

int64_t

An XFL floating point enclosing number

exponent

int32_t

The new exponent to set

Return Code

Type

Description

int64_t

The new XFL with the updated exponent

If negative, an error:
INVALID_FLOAT

  • the supplied parameter was not a valid XFL enclosing number

EXPONENT_OVERSIZED

  • the exponent was too large

EXPONENT_UNDERSIZED

  • the exponent was too small