signgam.c 286 B

123456789101112131415161718
  1. #define _XOPEN_SOURCE 600
  2. #include <math.h>
  3. #include <stdio.h>
  4. double zero = 0.0;
  5. double mzero;
  6. int
  7. main (void)
  8. {
  9. double d;
  10. mzero = copysign (zero, -1.0);
  11. d = lgamma (zero);
  12. printf ("%g %d\n", d, signgam);
  13. d = lgamma (mzero);
  14. printf ("%g %d\n", d, signgam);
  15. return 0;
  16. }