Exemplo n.º 1
0
 @Override
 public final int applyInteger(int operand) {
   if (operandNACheck.check(operand)) {
     return RRuntime.INT_NA;
   }
   try {
     return arithmetic.op(operand);
   } catch (Throwable e) {
     CompilerDirectives.transferToInterpreter();
     throw Operation.handleException(e);
   }
 }
Exemplo n.º 2
0
 @Override
 public final double applyDouble(RComplex operand) {
   if (operandNACheck.check(operand)) {
     return RRuntime.DOUBLE_NA;
   }
   try {
     return arithmetic.opd(operand.getRealPart(), operand.getImaginaryPart());
   } catch (Throwable e) {
     CompilerDirectives.transferToInterpreter();
     throw Operation.handleException(e);
   }
 }
Exemplo n.º 3
0
 @Override
 public final RComplex applyComplex(RComplex operand) {
   if (operandNACheck.check(operand)) {
     return RComplex.createNA();
   }
   try {
     return arithmetic.op(operand.getRealPart(), operand.getImaginaryPart());
   } catch (Throwable e) {
     CompilerDirectives.transferToInterpreter();
     throw Operation.handleException(e);
   }
 }