Applies the operator to the given value
if (pLeft == null &&
pRight == null) {
if (pLogger.isLoggingWarning ()) {
pLogger.logWarning
(Constants.ARITH_OP_NULL,
getOperatorSymbol ());
}
return PrimitiveObjects.getInteger (0);
}
double left =
Coercions.coerceToPrimitiveNumber (pLeft, Double.class, pLogger).
doubleValue ();
double right =
Coercions.coerceToPrimitiveNumber (pRight, Double.class, pLogger).
doubleValue ();
try {
return PrimitiveObjects.getDouble (left / right);
}
catch (Exception exc) {
if (pLogger.isLoggingError ()) {
pLogger.logError
(Constants.ARITH_ERROR,
getOperatorSymbol (),
"" + left,
"" + right);
}
return PrimitiveObjects.getInteger (0);
}