diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/.gitignore | 1 | ||||
-rw-r--r-- | test/math/Makefile.in | 3 | ||||
-rw-r--r-- | test/math/signgam.c | 18 |
3 files changed, 21 insertions, 1 deletions
diff --git a/test/.gitignore b/test/.gitignore index 464130d57..2070168b9 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -119,6 +119,7 @@ math/compile_test math/libm-test-ulps.h math/libm-test.c math/rint +math/signgam math/test-double math/test-ildoubl math/test-ldouble diff --git a/test/math/Makefile.in b/test/math/Makefile.in index b160c875d..8a46e77db 100644 --- a/test/math/Makefile.in +++ b/test/math/Makefile.in @@ -1,7 +1,7 @@ # uClibc math tests # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -TESTS := basic-test rint tst-definitions test-fpucw test-float test-ifloat test-double test-idouble +TESTS := basic-test rint signgam tst-definitions test-fpucw test-float test-ifloat test-double test-idouble ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),y) TESTS += test-ldouble test-ildoubl compile_test else @@ -9,6 +9,7 @@ CFLAGS_basic-test := -DNO_LONG_DOUBLE endif DODIFF_rint := 1 +DODIFF_signgam := 1 # NOTE: For basic-test we must disable the floating point optimization. # Only for sh architecture because in the other architecture are disabled. 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; +} |