public static float intRoot(int base,int root){
  float gNew=base / root;
  float gOld=0;
  int counter=0;
  while (Math.abs(gOld - gNew) > 0.0001) {
    float gPow=floatPow(gNew,root);
    while (Float.isInfinite(gPow)) {
      gNew=(gNew + gOld) / 2;
      gPow=floatPow(gNew,root);
    }
    counter+=1;
    gOld=gNew;
    gNew=gOld - (gPow - base) / (root * floatPow(gOld,root - 1));
  }
  return gNew;
}

public static float intRoot ( int base , int root ) { float gNew = base / root ; float gOld = 0 ; int counter = 0 ; while ( Math . abs ( gOld - gNew ) > 0.0001 ) { float gPow = floatPow ( gNew , root ) ; while ( Float . isInfinite ( gPow ) ) { gNew = ( gNew + gOld ) / 2 ; gPow = floatPow ( gNew , root ) ; } counter += 1 ; gOld = gNew ; gNew = gOld - ( gPow - base ) / ( root * floatPow ( gOld , root - 1 ) ) ; } return gNew ; }
takes an approximation of the root from an integer base , using newton ' s algorithm
