lz_negate
The number with its sign changed.
long lz_negate( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );
The number with its sign changed, in its own base.
Examples
| Call | Answer |
|---|---|
lz_negate( 2.5 ) | −2.5 |
lz_negate( −0x1F ) | 1F base 16 |
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_absThe absolute value.lz_plusThe number itself, unchanged: the decimal standard's unary plus.lzc_negateThe complex number with both signs changed.