docs: public static double sigmoid(double x) {
      if (x<0) {
        double num = Math.exp(x);
        return num / (1.0 + num);
      }
      else {
        double den = 1.0 + Math.exp(-x);
        return 1.0 / den;
      }
    }