diff options
author | Ben Pfaff <blp@cs.stanford.edu> | 2007-10-20 13:08:26 -0700 |
---|---|---|
committer | Ben Pfaff <blp@cs.stanford.edu> | 2007-10-20 13:08:26 -0700 |
commit | 980d2709cea1e46299cb5b4f74f7c7a95d07ef06 (patch) | |
tree | 583de12457ed658055feba92a97f6d0257135e0e /modules | |
parent | 36454274190b141a37308d9b266b3d0b68a71694 (diff) | |
download | gnulib-980d2709cea1e46299cb5b4f74f7c7a95d07ef06.tar.gz |
Implement 'round', 'roundf', 'roundl' modules.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/math | 6 | ||||
-rw-r--r-- | modules/round | 32 | ||||
-rw-r--r-- | modules/round-tests | 21 | ||||
-rw-r--r-- | modules/roundf | 32 | ||||
-rw-r--r-- | modules/roundf-tests | 22 | ||||
-rw-r--r-- | modules/roundl | 32 | ||||
-rw-r--r-- | modules/roundl-tests | 16 |
7 files changed, 161 insertions, 0 deletions
diff --git a/modules/math b/modules/math index 15e16e633f..540f2fa65a 100644 --- a/modules/math +++ b/modules/math @@ -30,6 +30,9 @@ math.h: math.in.h -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \ -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \ -e 's|@''GNULIB_MATHL''@|$(GNULIB_MATHL)|g' \ + -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \ + -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \ + -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \ -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \ -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \ -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \ @@ -46,6 +49,9 @@ math.h: math.in.h -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ + -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ + -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ + -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ diff --git a/modules/round b/modules/round new file mode 100644 index 0000000000..0dd2526f87 --- /dev/null +++ b/modules/round @@ -0,0 +1,32 @@ +Description: +round() function: round toward nearest, breaking ties away from zero. + +Files: +lib/round.c +m4/check-libm-func.m4 +m4/round.m4 + +Depends-on: +float +floor +math +extensions + +configure.ac: +gl_FUNC_ROUND +gl_MATH_MODULE_INDICATOR([round]) + +Makefile.am: + +Include: +<math.h> + +Link: +$(ROUND_LIBM) + +License: +LGPL + +Maintainer: +Ben Pfaff + diff --git a/modules/round-tests b/modules/round-tests new file mode 100644 index 0000000000..d061431f19 --- /dev/null +++ b/modules/round-tests @@ -0,0 +1,21 @@ +Files: +tests/test-round1.c +tests/test-round2.c + +Depends-on: +isnan-nolibm +stdbool +stdint +fprintf-posix +verify + +configure.ac: + +Makefile.am: +TESTS += test-round1 test-round2 +check_PROGRAMS += test-round1 test-round2 +test_round1_LDADD = $(LDADD) @ROUND_LIBM@ +test_round2_LDADD = $(LDADD) @ROUND_LIBM@ + +License: +LGPL diff --git a/modules/roundf b/modules/roundf new file mode 100644 index 0000000000..f24e347519 --- /dev/null +++ b/modules/roundf @@ -0,0 +1,32 @@ +Description: +roundf() function: round toward nearest, breaking ties away from zero. + +Files: +lib/round.c +lib/roundf.c +m4/check-libm-func.m4 +m4/roundf.m4 + +Depends-on: +float +math +extensions + +configure.ac: +gl_FUNC_ROUNDF +gl_MATH_MODULE_INDICATOR([roundf]) + +Makefile.am: + +Include: +<math.h> + +Link: +$(ROUNDF_LIBM) + +License: +LGPL + +Maintainer: +Ben Pfaff + diff --git a/modules/roundf-tests b/modules/roundf-tests new file mode 100644 index 0000000000..9fc69ebdcb --- /dev/null +++ b/modules/roundf-tests @@ -0,0 +1,22 @@ +Files: +tests/test-roundf1.c +tests/test-round2.c +tests/test-roundf2.c + +Depends-on: +isnanf-nolibm +stdbool +stdint +fprintf-posix +verify + +configure.ac: + +Makefile.am: +TESTS += test-roundf1 test-roundf2 +check_PROGRAMS += test-roundf1 test-roundf2 +test_roundf1_LDADD = $(LDADD) @ROUNDF_LIBM@ +test_roundf2_LDADD = $(LDADD) @ROUNDF_LIBM@ + +License: +LGPL diff --git a/modules/roundl b/modules/roundl new file mode 100644 index 0000000000..3533d0f28a --- /dev/null +++ b/modules/roundl @@ -0,0 +1,32 @@ +Description: +roundl() function: round toward nearest, breaking ties away from zero. + +Files: +lib/round.c +lib/roundl.c +m4/check-libm-func.m4 +m4/roundl.m4 + +Depends-on: +float +math +extensions + +configure.ac: +gl_FUNC_ROUNDL +gl_MATH_MODULE_INDICATOR([roundl]) + +Makefile.am: + +Include: +<math.h> + +Link: +$(ROUNDL_LIBM) + +License: +LGPL + +Maintainer: +Ben Pfaff + diff --git a/modules/roundl-tests b/modules/roundl-tests new file mode 100644 index 0000000000..957c9341dd --- /dev/null +++ b/modules/roundl-tests @@ -0,0 +1,16 @@ +Files: +tests/test-roundl.c + +Depends-on: +fpucw +isnanl-nolibm + +configure.ac: + +Makefile.am: +TESTS += test-roundl +check_PROGRAMS += test-roundl +test_roundl_LDADD = $(LDADD) @ROUNDL_LIBM@ + +License: +LGPL |