Multiply two XFL numbers together
Concepts
Behaviour
- Compute the multiplication of two XFL (xls17) floating point numbers
- Return a new XFL as an int64_t
Definition
int64_t float_multiply (
int64_t float1,
int64_t float2
);
Example
int64_t max_vault_pusd =
float_multiply(vault_xrp, exchange_rate);
Parameters
Name | Type | Description |
---|---|---|
float1 | int64_t | An XFL floating point enclosing number representing the first operand to the multiplication |
float2 | int64_t | An XFL floating point enclosing number representing the second operand to the multiplication |
Caution
Certain multiplications may overflow, which return with an
INVALID_FLOAT
error. However an underflow returns as XFL Canonical Zero (i.e. enclosing number = 0).
Return Code
Type | Description |
---|---|
int64_t | The XFL (xls17) enclosing number If negative, an error: INVALID_FLOAT - one of the supplied parameters was not a valid XFL enclosing number OVERFLOW - the result of the multiplication was too large to store in an XFL. |