code: public SBPrintStream pj(double s) {
      if (Double.isInfinite(s)) {
        append("Double.").append(s > 0 ? "POSITIVE_INFINITY" : "NEGATIVE_INFINITY");
      } else if (Double.isNaN(s)) {
        append("Double.NaN");
      } else {
        append(s);
      }
      return this;
    }
docs: Java specific append of double