chickadee » math » integer-root/remainder

integer-root/remainder n mprocedure
n
integer
m
integer

Returns two values. The first, r, is the mth integer root of n. The second is n-r^m.

> (integer-root/remainder (expt 3 4) 4)
3
0
> (integer-root/remainder (+ (expt 3 4) 1) 4)
3
1