sum = sum.plus((ComputableValue) value);
} catch(final XPathException e) {
throw new XPathException(this, ErrorCodes.FORG0006, e.getMessage());
}
}
result = sum.div(new IntegerValue(inner.getItemCount()));
}
if (!gotInfinity) {
if (Type.subTypeOf(result.getItemType(), Type.NUMBER) &&
((NumericValue)result).isInfinite()) {
//Throw an overflow exception here since we get an infinity