* @return the complementary error function.
*/
public static Object engineerErfc(Object[] args, XelContext ctx) {
double x = CommonFns.toNumber(args[0]).doubleValue();
if(x < 0) {
throw new SSErrorXelException(SSError.NUM);
}
try {
double erfc = 1 - Erf.erf(x);
return new Double(erfc);
} catch (MathException e) {
throw new SSErrorXelException(SSError.VALUE);
}
}