signgam = 0; check_eps ("lgamma (0.7) == 0.26086...", FUNC(lgamma) (0.7), 0.26086724653166651439L, CHOOSE(0, 6e-17, 3e-8)); check_int ("lgamma (0.7) sets signgam to 1", signgam, 1);  signgam = 0; check_eps ("lgamma (1.2) == -0.08537...", FUNC(lgamma) (1.2), -0.853740900033158497197e-1L, CHOOSE(0, 2e-17, 2e-8)); check_int ("lgamma (1.2) sets signgam to 1", signgam, 1);
lgamma_test (void){  errno = 0;  FUNC(lgamma) (0);  if (errno == ENOSYS)    /* Function not implemented.  */    return;  feclearexcept (FE_ALL_EXCEPT);  check_isinfp ("lgamma (+inf) == +inf", FUNC(lgamma) (plus_infty));  check_isinfp_exc ("lgamma (0) == +inf plus divide by zero exception",		    FUNC(lgamma) (0), DIVIDE_BY_ZERO_EXCEPTION);  check_isinfp_exc ("lgamma (x) == +inf plus divide by zero exception for integer x <= 0",		    FUNC(lgamma) (-3), DIVIDE_BY_ZERO_EXCEPTION);  check_isnan_exc ("lgamma (-inf) == NaN plus invalid exception",                   FUNC(lgamma) (minus_infty), INVALID_EXCEPTION);  signgam = 0;  check ("lgamma (1) == 0", FUNC(lgamma) (1), 0);  check_int ("lgamma (0) sets signgam to 1", signgam, 1);  signgam = 0;  check ("lgamma (3) == M_LN2", FUNC(lgamma) (3), M_LN2);  check_int ("lgamma (3) sets signgam to 1", signgam, 1);  signgam = 0;  check_eps ("lgamma (0.5) == log(sqrt(pi))", FUNC(lgamma) (0.5),             FUNC(log) (FUNC(sqrt) (M_PI)), CHOOSE (0, 1e-15, 1e-7));  check_int ("lgamma (0.5) sets signgam to 1", signgam, 1);  signgam = 0;  check_eps ("lgamma (-0.5) == log(2*sqrt(pi))", FUNC(lgamma) (-0.5),             FUNC(log) (2*FUNC(sqrt) (M_PI)), CHOOSE (0, 1e-15, 0));  check_int ("lgamma (-0.5) sets signgam to -1", signgam, -1);}