fn:avg

fn:avg(anyAtomicType* $srcval) → anyAtomicType?

Function signature

$srcval

xdt:anyAtomicType *

Result

xdt:anyAtomicType ?

Returns the average of a set of numbers

XPath 2.0 Specification

Implemented. Changed in 7.4 to return the same type as the argument, when appropriate. (For a set of integers, the result is a double). Not yet implemented for other addable types, e.g. duration.


Expand

Up  Next