Add test_minmax that checks different comparisons when nans and infs are related.