EL doesn't support upcasting/formatting. An universal solution would be to create a custom EL function referring the below utility method:
public static String formatNumber(Number number, String pattern) {
if (number == null) {
return null;
}
DecimalFormat formatter = (DecimalFormat) NumberFormat.getNumberInstance(getLocale());
formatter.applyPattern(pattern);
return formatter.format(number);
}
You can then use it as below:
<p:commandButton value="#{util:formatNumber(bean.intA / bean.intB, '#')}" ... />
In case you happen to use JSF utility library OmniFaces, it's available as #{of:formatNumber()}
whose source code is actually copied above.