Availability:built-in

**nth_integer_root_and_remainder**(

`+N, +I, -Root, -Remainder`)

`Root ** N + Remainder = I`.

`N`and

`I`must be integers.

^{123This predicate was suggested by Markus Triska. The final name and argument order is by Richard O'Keefe. The decision to include the remainder is by Jan Wielemaker. Including the remainder makes this predicate about twice as slow if Root is not exact.}

`N`must be one or more. If

`I`is negative and

`N`is

*odd*,

`Root`and

`Remainder`are negative, i.e., the following holds for

`:`

`I`< 0% I < 0, % N mod 2 =\= 0, nth_integer_root_and_remainder( N, I, Root, Remainder), IPos is -I, nth_integer_root_and_remainder( N, IPos, RootPos, RemainderPos), Root =:= -RootPos, Remainder =:= -RemainderPos.