addaptic

Reference Complex arithmetic

lzc_square

The complex number times itself.

long lzc_square( CLZComplex* leftOperand, CLZComplex* targetNumber = nullptr );

Each part worked exactly and rounded once, half-even, as a function is, whatever the target's settings.

Examples

CallAnswer
lzc_square( 1 + 2i )−3 + 4i
lzc_square( 0 + 1i )−1 + 0i

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