addaptic

Reference Powers and roots

lz_root_3

The cube root.

long lz_root_3( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );

Correctly rounded, by Newton's method, and at wide widths on the reciprocal cube root. A negative number has a real cube root: the cube root of −8 is −2.

Examples

CallAnswer
lz_root_3( 2 )1.259921049894873164767210607278228351
lz_root_3( −8 )−2
lz_root_3( 0.001 )0.1

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_root_2 The square root.
  • lz_root_n The root of the left number whose order is the right.
  • lzc_root_3 The cube root of a complex number; an odd root of a negative real is the real root.