float_root
Concepts
Section titled “Concepts”Behaviour
Section titled “Behaviour”- Compute a the
nthroot of an XFL number - Return the new XFL
- Calculates the nth root of a float representation.
- An error code or the resulting root as a bigint.
Definition
Section titled “Definition”int64_t float_root ( int64_t float1, uint32_t n);function float_root(f1: bigint, n: number): ErrorCode | bigintExample
Section titled “Example”int64_t three = float_root(nine, 2);const three = float_root(nine, 2)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| float1 | int64_t | An XFL floating point enclosing number representing the floating point number to take the square root of |
| n | uint32_t | The root to compute, for example 2 is a square root. |
| Name | Type | Description |
|---|---|---|
| f1 | bigint | The float to calculate the root of. |
| n | number | The degree of the root to calculate. |
Return Code
Section titled “Return Code”| Type | Description |
|---|---|
| int64_t | The computed nth root |
| Type | Description |
|---|---|
| bigint or ErrorCode | Returns an error code or the resulting root as a bigint. |