Although your example is about integers, you know that any numerical algorithm that deals with roots and logarithms will have to work with floating point numbers. And when dealing with floating point numbers you have to accept that they are not exact representation of real numbers, so you are expected to work within some precision.
If you limit your precision to, say, 8 decimal places, you can get pretty good approximations.
USER>Set n=27,root=n**(1/3) USER>Write $FN(root,"",8) 3.00000000 USER>Write +$FN(root,"",8) 3
- Log in to post comments