Use NaN instead of inf for fcompare test