summaryrefslogtreecommitdiff
path: root/test/math/signgam.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/math/signgam.c')
-rw-r--r--test/math/signgam.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/math/signgam.c b/test/math/signgam.c
new file mode 100644
index 000000000..c60375aec
--- /dev/null
+++ b/test/math/signgam.c
@@ -0,0 +1,18 @@
+#define _XOPEN_SOURCE 600
+#include <math.h>
+#include <stdio.h>
+
+double zero = 0.0;
+double mzero;
+
+int
+main (void)
+{
+ double d;
+ mzero = copysign (zero, -1.0);
+ d = lgamma (zero);
+ printf ("%g %d\n", d, signgam);
+ d = lgamma (mzero);
+ printf ("%g %d\n", d, signgam);
+ return 0;
+}