public double sigmoid(double z){
  double answer=0;
  if (z >= maxExponent)   return 1;
 else   if (z <= -maxExponent)   return 0;
 else {
    double index=tableSize * Math.abs(z) / (double)maxExponent;
    answer=sigmoidTable[(int)index];
    if (z < 0)     answer=1 - answer;
  }
  return answer;
}

public double sigmoid ( double z ) { double answer = 0 ; if ( z >= maxExponent ) return 1 ; else if ( z <= - maxExponent ) return 0 ; else { double index = tableSize * Math . abs ( z ) / ( double ) maxExponent ; answer = sigmoidTable [ ( int ) index ] ; if ( z < 0 ) answer = 1 - answer ; } return answer ; }
look up the sigmoid for an incoming value
