Add a range function that finds both the maximum & minimum in a single pass
renamed range to extrema
add minmax function for scalars
Merge pull request #5275 from lindahua/dh/minmax2

Add minmax and extrema