CoCoA:Iroot

From ApCoCoAWiki

Iroot

integer part of r-th root of an integer

Description

This function computes the R-th root of an integer. If the argument is

not a perfect R-th power it returns the integer part of the root.

Example

  Iroot(25, 2);
5
-------------------------------
  Iroot(99, 3);
4
-------------------------------
  Iroot(-1, 3);
-1
-------------------------------

Syntax

Iroot(N:INT, R: INT):INT

ILogBase

   <type>integer</type>