You should not rely on assumed behavior of functions when treating NaN. You should treat the case explicitly on your diagram.
By IEEE standard the comparisons
X > NaN should return FALSE
X < NaN should also return FALSE.
Then the output of a MinMax function with a NaN input actually depends on how you compare both inputs.
using for example
if (X > Y) then
Max = X;
Min = Y;
else
Max = Y;
Min = X;
end
This implementation always returns Max = Y and Min = X when comparing with a NaN input because (X > Y) is FALSE.
On the other hand, the implementation
if (X < Y) then
Max = Y;
Min = X;
else
Max = X;
Min = Y;
end
does return swapped values for Min and Max for NaN inputs.
Usually, primitives don't check
explicitely for NaN values because it would unecessarly bloat the code. This kind of NaN check is left to the programmer because anyway the output of MinMax function is meaningless when inputs are NaN.