lzc_divide
The quotient of two complex numbers, left over right.
long lzc_divide( CLZComplex* leftOperand, CLZComplex* rightOperand, CLZComplex* targetNumber = nullptr );
Each part worked from exact intermediates and rounded once. A division by nought returns kDivideByZero with both parts infinite: the one point at infinity, since this engine's infinities carry no sign and so a complex one has no direction.
Examples
| Call | Answer | Returns |
|---|---|---|
lzc_divide( 1 + 2i, 3 + 4i ) | 0.44 + 0.08i | kNoError |
lzc_divide( 1 + 0i, 0 + 1i ) | 0 − 1i | kNoError |
lzc_divide( 1 + 1i, 0 + 0i ) | the point at infinity | kDivideByZero |
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
lzc_multiplyThe product of two complex numbers.lz_divideThe quotient of two numbers, left over right.