#include #include #include #include int main(void) { _Complex long double test_cabsl = LDBL_MAX + 0.0L * _Complex_I; long double test_hypotl1 = LDBL_MAX, test_hypotl2 = 0.0L; _Complex double test_cabs = DBL_MAX + 0.0L * _Complex_I; double test_hypot1 = DBL_MAX, test_hypot2 = 0.0L; _Complex float test_cabsf = FLT_MAX + 0.0L * _Complex_I; float test_hypotf1 = FLT_MAX, test_hypotf2 = 0.0L; printf("cabsl(%Lg%+Lgi) = %Lg\n", creall(test_cabsl), cimagl(test_cabsl), cabsl(test_cabsl)); printf("hypotl(%Lg, %Lg) = %Lg\n\n", test_hypotl1, test_hypotl2, hypotl(test_hypotl1, test_hypotl2)); printf("cabs(%lg%+lgi) = %lg\n", creal(test_cabs), cimag(test_cabs), cabs(test_cabs)); printf("hypot(%lg, %lg) = %lg\n\n", test_hypot1, test_hypot2, hypot(test_hypot1, test_hypot2)); printf("cabsf(%g%+gi) = %g\n", crealf(test_cabsf), cimagf(test_cabsf), cabsf(test_cabsf)); printf("hypotf(%g, %g) = %g\n\n", test_hypotf1, test_hypotf2, hypotf(test_hypotf1, test_hypotf2)); return 0; }