Added iamin and iamax implementations

(only for real numbers)