code: @Override
      public AtomicValue operate(final AtomicValue mOperand1, final AtomicValue mOperand2)
          throws TTXPathException {
  
          final Type returnType = getReturnType(mOperand1.getTypeKey(), mOperand2.getTypeKey());
          final int typeKey = NamePageHash.generateHashForString(returnType.getStringRepr());
  
          final byte[] value;
  
          switch (returnType) {
          case DOUBLE:
          case FLOAT:
          case DECIMAL:
          case INTEGER:
              final double dOp1 = Double.parseDouble(new String(mOperand1.getRawValue()));
              final double dOp2 = Double.parseDouble(new String(mOperand2.getRawValue()));
              value = TypedValue.getBytes(dOp1 - dOp2);
              break;
          case DATE:
          case TIME:
          case DATE_TIME:
          case YEAR_MONTH_DURATION:
          case DAY_TIME_DURATION:
              throw new IllegalStateException("Add operator is not implemented for the type "
                  + returnType.getStringRepr() + " yet.");
          default:
              throw new XPathError(ErrorType.XPTY0004);
  
          }
  
          return new AtomicValue(value, typeKey);
  
      }
docs: {@inheritDoc}