Reimplemented min/max through op decomposition