code: public static double logAdd(double x, double y) {
          if (FastMath.useLogAddTable) {
              return SmoothedLogAddTable.logAdd(x,y);
          } else {
              return FastMath.logAddExact(x,y);
          }
      }
docs: Adds two probabilities that are stored as log probabilities.
  @param x log(p)
  @param y log(q)
  @return log(p + q) = log(exp(x) + exp(y))