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 DECIMAL:
          case FLOAT:
          case DOUBLE:
              final double aD = Double.parseDouble(new String(mOperand1.getRawValue()));
              final double dValue;
  
              if (aD == 0.0 || aD == -0.0) {
                  dValue = Double.NaN;
              } else {
                  dValue = aD / Double.parseDouble(new String(mOperand2.getRawValue()));
              }
  
              value = TypedValue.getBytes(dValue);
              return new AtomicValue(value, typeKey);
  
          case INTEGER:
              try {
                  final int iValue =
                      (int)Double.parseDouble(new String(mOperand1.getRawValue()))
                          / (int)Double.parseDouble(new String(mOperand2.getRawValue()));
                  value = TypedValue.getBytes(iValue);
                  return new AtomicValue(value, typeKey);
              } catch (final ArithmeticException e) {
                  throw new XPathError(ErrorType.FOAR0001);
              }
          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);
  
          }
  
      }
docs: {@inheritDoc}