Calculating the mth root of a rational number
We use a discrete form of Newton's method to find [x1/m], the integer part of the mth root of a positive integer x.
(See K.R. Matthews, Computing m-th roots, The College Mathematics Journal 19 (1988) 174-176 [also see MP313 lecture notes] and H. Lüneburg's book On the Rational Normal Form of Endomorphisms 1987, B.I. Wissenschaftsverlag, Mannheim/Wien/Zürich.)
Note that if x=a/b, a > 0, b > 0, is a positive rational, then [x1/m]=[[x]1/m].
The answer is given truncated to r decimal places.
This is a BCMATH version of a BC function mthrootr(a,b,m,r) contained in the file gcd.
Last modified 4th January 2014
Return to main page