untested multivariate exp-max in Java