from https://www.netlib.org/cephes/ cmath.tgz cbrt.c
Cube root
DESCRIPTION:
Returns the cube root of the argument, which may be negative.
Range reduction involves determining the power of 2 of the argument. A polynomial of degree 2 applied to the mantissa, and multiplication by the cube root of 1, 2, or 4 approximates the root to within about 0.1%. Then Newton's iteration is used three times to converge to an accurate result.
ACCURACY:
Relative error:
arithmetic domain # trials peak rms DEC -10,10 200000 1.8e-17 6.2e-18 IEEE 0,1e308 30000 1.5e-16 5.0e-17
cbrt.c
Cephes Math Library Release 2.8: June, 2000 Copyright 1984, 1991, 2000 by Stephen L. Moshier
cbrt.nim Copyright litlighilit 2024