Integer roots: Difference between revisions
Content added Content deleted
No edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
'''Integer roots''' |
'''Integer roots''' |
||
The task is to write a program that computes an approximation to the principal N<sup>th</sup> root of X as the largest integer less than or equal to R for which R<sup>N</sup>=X. N is a positive integer. X is a non-negative integer. The root R is a non-negative real number. No arbitrary |
The task is to write a program that computes an approximation to the principal N<sup>th</sup> root of X as the largest integer less than or equal to R for which R<sup>N</sup>=X. N is a positive integer. X is a non-negative integer. The root R is a non-negative real number. No arbitrary limits should be placed on the magnitudes of the numbers involved. |
||
Example: With N=3 and X=8 you would calculate the number 2 because <math>2^3=8</math>. |
Example: With N=3 and X=8 you would calculate the number 2 because <math>2^3=8</math>. |