Bug With Floating-Point NaN
The a > b ? a : b check will fail when b is NaN and a is not, since comparison with NaN is always false. The expected behavior is to return a. Use fmaxfmaximum_num, fmaxffmaximum_numf or fmaxlfmaximum_numl for these types. (Unlike the fmax family, these are defined to handle NaN and comparisons between +0 and -0 correctly.)
Prior to C23, there is theoretically another issue that could come up with the sign-and-magnitude representation of -0. In C23, all signed integral types are two’s-complement.