docs: public static double trigamma(double x) {
      if(!(x > 0)) {
        return Double.NaN;
      }
      // Method of equation 5:
      if(x <= 1e-5) {
        return 1. / (x * x);
      }
      // Method of equation 4:
      else if(x > 49.) {
        final double ix2 = 1. / (x * x);
        // Partial series expansion
        return 1 / x - ix2 / 2. + ix2 / x * (1.0 / 6. - ix2 * (1.0 / 30. + ix2 / 42.));
        // + O(x^8) error
      }
      else {
        // Stirling expansion
        return trigamma(x + 1.) - 1. / (x * x);
      }
    }