float_set
Concepts
Section titled “Concepts”Behaviour
Section titled “Behaviour”- Compute an XFL (xls17) floating point from the provided exponent and mantissa
- Return that XFL as an int64_t
- Sets the exponent and mantissa for a float representation.
- Returns an error code or a new XFL as a bigint.
Definition
Section titled “Definition”int64_t float_set ( int32_t exponent, int64_t mantissa);
function float_set(exponent: number, mantissa: number): ErrorCode | bigint
Example
Section titled “Example”int64_t small_amount = float_set(-81, 1);
const small_amount = float_set(-81, 1);
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
exponent | int32_t | An exponent in the range -96 to 80 |
mantissa | int64_t | A mantissa. If negative then the sign of the float is negative. |
Name | Type | Description |
---|---|---|
exponent | bigint | An exponent in the range -96 to 80 |
mantissa | bigint | A mantissa. If negative then the sign of the float is negative. |
Return Code
Section titled “Return Code”Type | Description |
---|---|
int64_t | The XFL (xls17) enclosing number |
Type | Description |
---|---|
ErrorCode | bigint | An error code or the XFL (xls17) enclosing number. |