Fix implementation of FMIN/FMAX NaN case