docs: public static double[] logs2probs(double[] a) {
  
      double max = a[maxIndex(a)];
      double sum = 0.0;
  
      double[] result = new double[a.length];
      for(int i = 0; i < a.length; i++) {
        result[i] = Math.exp(a[i] - max);
        sum += result[i];
      }
  
      normalize(result, sum);
  
      return result;
    }