docs: public static float logAdd(float lx, float ly) {
      float max, negDiff;
      if (lx > ly) {
        max = lx;
        negDiff = ly - lx;
      } else {
        max = ly;
        negDiff = lx - ly;
      }
      if (max == Double.NEGATIVE_INFINITY) {
        return max;
      } else if (negDiff < -LOGTOLERANCE_F) {
        return max;
      } else {
        return max + (float) Math.log(1.0 + Math.exp(negDiff));
      }
    }