Cubic Root

Q.
How can we find a cubic root?
A.
The cubic root of a can be found by a^(1/3).
But, since the calculation result of 1/3 has an error, a^(1/3) may have an error.
In Decimal BASIC, as the calculation result of 1/3 becomes 0.333333333333333333333333333, the error that 1/3 has is 0.333…×10-17.
When f(x)=ax, f ' (x)=axloga, thus we have an estimation of the error
a1/3a0.333333333333333333333333333≒a1/3log a×0.333…×10-17
and then the relative error exceeds 10-17 when log a > 3.
That is, errors can not be ignored when a>20.
We can say otherwise that the calculation has sufficient accuracy because the relative errors do not exceed 10-15 when a ≤ 1E99 (MAXNUM).

In addition, the decision whether an integer n of within 15 digits is a cubic number can be done by n=ROUND(n^(1/3), 0)^3 .
Because n1/3logn×0.333…×10-17 is sufficiently small rather than 1 when n<1016.

Back