result = FUNC(csqrt) (BUILD_COMPLEX (-2, 3)); check_eps ("real(csqrt(-2 + i 3)) == 0.89597...", __real__ result, 0.8959774761298381247L, CHOOSE(6e-20L, 2e-16, 6e-8)); check_eps ("imag(csqrt(-2 + i 3)) == 1.67414...", __imag__ result, 1.6741492280355400404L, CHOOSE(0, 5e-16, 0));
csqrt_test (void){  __complex__ MATHTYPE result;  result = FUNC(csqrt) (BUILD_COMPLEX (0, 0));  check ("real(csqrt(0 + i0)) = 0", __real__ result, 0);  check ("imag(csqrt(0 + i0)) = 0", __imag__ result, 0);  result = FUNC(csqrt) (BUILD_COMPLEX (0, minus_zero));  check ("real(csqrt(0 - i0)) = 0", __real__ result, 0);  check ("imag(csqrt(0 - i0)) = -0", __imag__ result, minus_zero);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, 0));  check ("real(csqrt(-0 + i0)) = 0", __real__ result, 0);  check ("imag(csqrt(-0 + i0)) = 0", __imag__ result, 0);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, minus_zero));  check ("real(csqrt(-0 - i0)) = 0", __real__ result, 0);  check ("imag(csqrt(-0 - i0)) = -0", __imag__ result, minus_zero);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, 0));  check ("real(csqrt(-Inf + i0)) = 0", __real__ result, 0);  check_isinfp ("imag(csqrt(-Inf + i0)) = +Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, 6));  check ("real(csqrt(-Inf + i6)) = 0", __real__ result, 0);  check_isinfp ("imag(csqrt(-Inf + i6)) = +Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, minus_zero));  check ("real(csqrt(-Inf - i0)) = 0", __real__ result, 0);  check_isinfn ("imag(csqrt(-Inf - i0)) = -Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, -6));  check ("real(csqrt(-Inf - i6)) = 0", __real__ result, 0);  check_isinfn ("imag(csqrt(-Inf - i6)) = -Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, 0));  check_isinfp ("real(csqrt(+Inf + i0)) = +Inf", __real__ result);  check ("imag(csqrt(+Inf + i0)) = 0", __imag__ result, 0);  result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, 6));  check_isinfp ("real(csqrt(+Inf + i6)) = +Inf", __real__ result);  check ("imag(csqrt(+Inf + i6)) = 0", __imag__ result, 0);  result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, minus_zero));  check_isinfp ("real(csqrt(+Inf - i0)) = +Inf", __real__ result);  check ("imag(csqrt(+Inf - i0)) = -0", __imag__ result, minus_zero);  result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, -6));  check_isinfp ("real(csqrt(+Inf - i6)) = +Inf", __real__ result);  check ("imag(csqrt(+Inf - i6)) = -0", __imag__ result, minus_zero);  result = FUNC(csqrt) (BUILD_COMPLEX (0, plus_infty));  check_isinfp ("real(csqrt(0 + i Inf)) = +Inf", __real__ result);  check_isinfp ("imag(csqrt(0 + i Inf)) = +Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (4, plus_infty));  check_isinfp ("real(csqrt(4 + i Inf)) = +Inf", __real__ result);  check_isinfp ("imag(csqrt(4 + i Inf)) = +Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, plus_infty));  check_isinfp ("real(csqrt(+Inf + i Inf)) = +Inf", __real__ result);  check_isinfp ("imag(csqrt(+Inf + i Inf)) = +Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, plus_infty));  check_isinfp ("real(csqrt(-0 + i Inf)) = +Inf", __real__ result);  check_isinfp ("imag(csqrt(-0 + i Inf)) = +Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (-4, plus_infty));  check_isinfp ("real(csqrt(-4 + i Inf)) = +Inf", __real__ result);  check_isinfp ("imag(csqrt(-4 + i Inf)) = +Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, plus_infty));  check_isinfp ("real(csqrt(-Inf + i Inf)) = +Inf", __real__ result);  check_isinfp ("imag(csqrt(-Inf + i Inf)) = +Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (0, minus_infty));  check_isinfp ("real(csqrt(0 - i Inf)) = +Inf", __real__ result);  check_isinfn ("imag(csqrt(0 - i Inf)) = -Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (4, minus_infty));  check_isinfp ("real(csqrt(4 - i Inf)) = +Inf", __real__ result);  check_isinfn ("imag(csqrt(4 - i Inf)) = -Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, minus_infty));  check_isinfp ("real(csqrt(+Inf - i Inf)) = +Inf", __real__ result);  check_isinfn ("imag(csqrt(+Inf - i Inf)) = -Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, minus_infty));  check_isinfp ("real(csqrt(-0 - i Inf)) = +Inf", __real__ result);  check_isinfn ("imag(csqrt(-0 - i Inf)) = -Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (-4, minus_infty));  check_isinfp ("real(csqrt(-4 - i Inf)) = +Inf", __real__ result);  check_isinfn ("imag(csqrt(-4 - i Inf)) = -Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, minus_infty));  check_isinfp ("real(csqrt(-Inf - i Inf)) = +Inf", __real__ result);  check_isinfn ("imag(csqrt(-Inf - i Inf)) = -Inf", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, nan_value));  check_isnan ("real(csqrt(-Inf + i NaN)) = NaN", __real__ result);  check_isinfp ("imag(csqrt(-Inf + i NaN)) = +-Inf",		FUNC(fabs) (__imag__ result));  result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, nan_value));  check_isinfp ("real(csqrt(+Inf + i NaN)) = +Inf", __real__ result);  check_isnan ("imag(csqrt(+Inf + i NaN)) = NaN", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (0, nan_value));  check_isnan_maybe_exc ("real(csqrt(0 + i NaN)) = NaN plus maybe invalid exception",			 __real__ result, INVALID_EXCEPTION);  check_isnan ("imag(csqrt(0 + i NaN)) = NaN plus maybe invalid exception",	       __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (1, nan_value));  check_isnan_maybe_exc ("real(csqrt(1 + i NaN)) = NaN plus maybe invalid exception",			 __real__ result, INVALID_EXCEPTION);  check_isnan ("imag(csqrt(1 + i NaN)) = NaN plus maybe invalid exception",	       __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, nan_value));  check_isnan_maybe_exc ("real(csqrt(-0 + i NaN)) = NaN plus maybe invalid exception",			 __real__ result, INVALID_EXCEPTION);  check_isnan ("imag(csqrt(-0 + i NaN)) = NaN plus maybe invalid exception",	       __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (-1, nan_value));  check_isnan_maybe_exc ("real(csqrt(-1 + i NaN)) = NaN plus maybe invalid exception",			 __real__ result, INVALID_EXCEPTION);  check_isnan ("imag(csqrt(-1 + i NaN)) = NaN plus maybe invalid exception",	       __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, 0));  check_isnan_maybe_exc ("real(csqrt(NaN + i0)) = NaN plus maybe invalid exception",			 __real__ result, INVALID_EXCEPTION);  check_isnan ("imag(csqrt(NaN + i0)) = NaN plus maybe invalid exception",	       __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, 8));  check_isnan_maybe_exc ("real(csqrt(NaN + i8)) = NaN plus maybe invalid exception",			 __real__ result, INVALID_EXCEPTION);  check_isnan ("imag(csqrt(NaN + i8)) = NaN plus maybe invalid exception",	       __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, minus_zero));  check_isnan_maybe_exc ("real(csqrt(NaN - i0)) = NaN plus maybe invalid exception",			 __real__ result, INVALID_EXCEPTION);  check_isnan ("imag(csqrt(NaN - i0)) = NaN plus maybe invalid exception",	       __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, -8));  check_isnan_maybe_exc ("real(csqrt(NaN - i8)) = NaN plus maybe invalid exception",			 __real__ result, INVALID_EXCEPTION);  check_isnan ("imag(csqrt(NaN - i8)) = NaN plus maybe invalid exception",	       __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, nan_value));  check_isnan ("real(csqrt(NaN + i NaN)) = NaN", __real__ result);  check_isnan ("imag(csqrt(NaN + i NaN)) = NaN", __imag__ result);  result = FUNC(csqrt) (BUILD_COMPLEX (16.0, -30.0));  check ("real(csqrt(16 - 30i)) = 5", __real__ result, 5.0);  check ("imag(csqrt(16 - 30i)) = -3", __imag__ result, -3.0);  result = FUNC(csqrt) (BUILD_COMPLEX (-1, 0));  check ("real(csqrt(1 + i0) = 0", __real__ result, 0);  check ("imag(csqrt(1 + i0) = 1", __imag__ result, 1);  result = FUNC(csqrt) (BUILD_COMPLEX (0, 2));  check ("real(csqrt(0 + i 2) = 1", __real__ result, 1);  check ("imag(csqrt(0 + i 2) = 1", __imag__ result, 1);  result = FUNC(csqrt) (BUILD_COMPLEX (119, 120));  check ("real(csqrt(119 + i 120) = 12", __real__ result, 12);  check ("imag(csqrt(119 + i 120) = 5", __imag__ result, 5);  result = FUNC(csqrt) (BUILD_COMPLEX (0.7, 1.2));  check_eps ("real(csqrt(0.7 + i 1.2)) == 1.02206...", __real__ result,	     1.0220676100300264507L, CHOOSE(3e-17L, 3e-16, 2e-7));  check_eps ("imag(csqrt(0.7 + i 1.2)) == 0.58704...", __imag__ result,	     0.5870453129635652115L, CHOOSE(7e-18L, 0, 0));  result = FUNC(csqrt) (BUILD_COMPLEX (-2, -3));  check_eps ("real(csqrt(-2 - i 3)) == -0.89597...", __real__ result,	     0.8959774761298381247L, CHOOSE(6e-20L, 2e-16, 6e-8));  check_eps ("imag(csqrt(-2 - i 3)) == -1.67414...", __imag__ result,	     -1.6741492280355400404L, CHOOSE(0, 5e-16, 0));}