v.25.6Bug Fix (user-visible misbehavior in an official stable release)

Fix the sorting order of the NaNs

Fix the sorting order of the NaNs with a negative sign bit. #79847 (Pervakov Grigorii).