lz_exp_n
The left number raised to the power of the right.
long lz_exp_n( CLZNumber* leftOperand, CLZNumber* rightOperand, CLZNumber* targetNumber = nullptr );
xy, with the left number the base. A whole exponent is taken by repeated squaring, with no logarithm.
Examples
| Call | Answer |
|---|---|
lz_exp_n( 2, 10 ) | 1024 |
lz_exp_n( 10, 0.5 ) | 3.162277660168379331998893544432718534 |
lz_exp_n( 2, −1 ) | 0.5 |
Each answer is what Addaptic printed for the call, at 36 places unless a setting is shown.
Returns
kNoError (0) when the answer is written. Otherwise an error code, with the answer flagged infinite or not-a-number; see Errors and flags.