Add test_minmax that checks different comparisons when nans and infs are related.
Merge pull request #2096 from juj/test_minmax

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