public double Derivative(double x, double gain, double center)
        {
            double y;

            if (gain == 1)
            {
                double fx = HyperbolicTangentFunction.CommonActivation(x, gain, center);
                y = 1 - (fx * fx);
            }
            else
            {
                double xc    = x - center;
                double exp   = Math.Exp(-2 * (gain * xc));
                double expP1 = 1 + exp;
                y = 4 * gain * exp / (expP1 * expP1);
            }

            return(y);
        }
 public double Activation(double x, double gain, double center)
 {
     return(HyperbolicTangentFunction.CommonActivation(x, gain, center));
 }