lz_square
The number times itself.
long lz_square( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );
Correctly rounded, half-even. The third example squares a number a hair above √2.5; its square is a hair above 2.5, and rounds to it.
Examples
| Call | Answer |
|---|---|
lz_square( 1.1 ) | 1.21 |
lz_square( −3 ) | 9 |
lz_square( 1.581138830084189665999446772216359267 ) | 2.500000000000000000000000000000000000 |
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.
See also
lz_cubeThe number cubed.lz_powerThe left number raised to the power of the right.lz_root_2The square root.lzc_squareThe complex number times itself.