Requires unit MultiP. Calls Add, Sub, Mul, Dvdby2, Modd, Isqrt, Gcd, Equal, Jacobi,and Less. Returns an integer, not a number. Calls no procedures nor functions. Returns 0 for failure or error. Requires unit MultiP. Calls Prmdiv, Less, Equal, Sub, Dvd, Mul, Add, and Spwr.
TRUE indicates the array was long enough to hold the continued fraction.
Type tenr is imported from the unit. Note that indexing starts with 0. The type tenr is imported from MultiP. Requires unit MultiP, including the type tenr. It is assumed that indices 0 through leng comprise the integer part plus the complete period of the continued fraction, and that the cont. There is no error checking for proper input.