lzc_abs
The modulus of a complex number, |z|, a real answer.
long lzc_abs( CLZComplex* leftOperand, CLZNumber* targetNumber );
√(a² + b²), correctly rounded from the exact sum of the squares. The answer is real, so the target is a CLZNumber, and it is required: kFailed if null.
Examples
| Call | Answer |
|---|---|
lzc_abs( 3 + 4i ) | 5 |
lzc_abs( 1 + 1i ) | 1.414213562373095048801688724209698079 |
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.