about summary refs log tree commit diff
path: root/math/test-ldouble.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* Rename __LONG_DOUBLE_USES_FLOAT128 to __LDOUBLE_REDIRECTS_TO_FLOAT128_ABIPaul E. Murphy2020-04-301-1/+1
| | | | | | | | | | | | | | | Improve the commentary to aid future developers who will stumble upon this novel, yet not always perfect, mechanism to support alternative formats for long double. Likewise, rename __LONG_DOUBLE_USES_FLOAT128 to __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI now that development work has settled down. The command used was git grep -l __LONG_DOUBLE_USES_FLOAT128 ':!./ChangeLog*' | \ xargs sed -i 's/__LONG_DOUBLE_USES_FLOAT128/__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI/g' Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* math: Remove inline math testsAdhemerval Zanella2020-03-191-3/+0
| | | | | | | | | | | | | With mathinline removal there is no need to keep building and testing inline math tests. The gen-libm-tests.py support to generate ULP_I_* is removed and all libm-test-ulps files are updated to longer have the i{float,double,ldouble} entries. The support for no-test-inline is also removed from both gen-auto-libm-tests and the auto-libm-test-out-* were regenerated. Checked on x86_64-linux-gnu and i686-linux-gnu.
* ldbl-128ibm-compat: Add tests for IBM long double functionsRajalakshmi Srinivasaraghavan2020-03-061-0/+7
| | | | | | | | | | | | This patch creates test-ibm128* tests from the long double function tests. In order to explicitly test IBM long double functions -mabi=ibmlongdouble is added to CFLAGS. Likewise, update the test headers to correct choose ULPs when redirects are enabled. Co-authored-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> Co-authored-by: Paul E. Murphy <murphyp@linux.vnet.ibm.com>
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Run libm long double tests for long double = double.Joseph Myers2017-10-111-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All interfaces in the glibc API ought to be covered by the testsuite, even where they alias other interfaces. This patch arranges for libm tests to be run for long double when it aliases double; previously those tests were run only for the floating-point types with distinct formats. The long double tests are made to use the double ulps values in this case, as having a separate duplicate set of ulps for them seems unnecessary; to accommodate that, the test-<type>.h headers now specify the macro indexing into the ulps array explicitly instead of having it computed from PREFIX. Nothing special is done about vector function tests. None are supported for any long double = double platforms, and supporting vector functions for a type alias such as _Float32 would not simply fall out of adding the scalar aliases for that type - it would require vector function wrappers like those for *_finite (or, better, a new GCC feature to allow specifying the asm name for vector functions independently of that for scalar ones, as previously discussed), so it seems reasonable to require the sysdeps makefile setting of libmvec-tests to be updated if any such tests are to be run for type aliases. Tested for x86_64 and arm. * math/Makefile (test-types-basic): New variable. (test-types): Likewise. (libm-test-support): Use $(test-types) instead of $(types). (libm-tests-base-normal): Likewise. (libm-tests-base-finite): Likewise. (libm-tests-base-inline): Likewise. (generated): Likewise. ($(objpfx)libm-test-support-$(t).c): Likewise. (libm-tests-for-type iterator): Likewise. (libm-test-support iterator): Likewise. * math/libm-test-support.c (ulp_i_idx): Use ULP_I_IDX. (ulp_idx): Use ULP_IDX. * math/test-ldouble.h: Include <float.h>. (TYPE_STR): Define conditional on [LDBL_MANT_DIG == DBL_MANT_DIG]. (ULP_IDX): New macro. (ULP_I_IDX): Likewise. * math/test-double.h (ULP_IDX): Likewise. (ULP_I_IDX): Likewise. * math/test-float.h (ULP_IDX): Likewise. (ULP_I_IDX): Likewise. * math/test-float128.h (ULP_IDX): Likewise. (ULP_I_IDX): Likewise.
* float128: Add test-{float128,ifloat128,float128-finite}Paul E. Murphy2017-06-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds test support for float128, and lays some groundwork for future _FloatN types. * math/gen-libm-test.pl (@all_floats): Add ifloat128 and float128. (%all_floats_pfx): Add macro prefix for float128 (FLT128). * math/libm-test-exp10.inc (pow10_test): Do not test for _FloatN, * math/libm-test-isfinite.inc (finite_test): Likewise. * math/libm-test-lgamma.inc (gamma_test): Likewise. * math/libm-test-nexttoward.inc (nexttoward_test): Likewise. (nexttoward_test_data}: Likewise. * math/libm-test-remainder.inc (drem_test): Likewise. * math/libm-test-scalb.inc (scalb_test): Likewise. (scalb_test_data): Likewise. * math/libm-test-significand.inc (significand_test): Likewise. (significand_test_data): Likewise. * math/libm-test-support.c (check_complex): Replace __complex__ FLOAT with CFLOAT to get the support for old compiler. * math/libm-test-support.h (check_complex): Likewise. * math/test-double.h (CFLOAT, TEST_FLOATN): New macros. * math/test-float.h (CFLOAT, TEST_FLOATN): Likewise. * math/test-ldouble.h (CFLOAT, TEST_FLOATN): Likewise. * math/test-float128.h: New file. * math/test-math-floatn.h: New file.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Replace use of snprintf with strfrom in libm testsGabriel F. T. Gomes2016-12-201-4/+1
| | | | | | | | In order to support float128 tests, the calls to snprintf, which does not support the type __float128, are replaced with calls to strfrom{f,d,l}. Tested for powerpc64le, s390, and x64_64.
* Add SNAN, SNANF, SNANL macros.Joseph Myers2016-10-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | TS 18661-1 defines SNAN macros for signaling NaN values, suitable for use in static initializers. This patch adds them to glibc's <math.h> (provided you are building with GCC 3.3 or later; no attempt is made to provide any kind of nonconforming fallback for older compilers without the __builtin_nans functions). Tested for x86_64 and x86. * math/math.h [__GLIBC_USE (IEC_60559_BFP_EXT) && __GNUC_PREREQ (3, 3)] (SNANF): New macro. [__GLIBC_USE (IEC_60559_BFP_EXT) && __GNUC_PREREQ (3, 3)] (SNAN): Likewise. [__GLIBC_USE (IEC_60559_BFP_EXT) && __GNUC_PREREQ (3, 3)] (SNANL): Likewise. * manual/arith.texi (Infinity and NaN): Document SNANF, SNAN and SNANL. * math/test-double.h (snan_value_MACRO): New macro. * math/test-float.h (snan_value_MACRO): Likewise. * math/test-ldouble.h (snan_value_MACRO): Likewise. * math/libm-test.inc (issignaling_test_data): Add tests of snan_value_MACRO.
* Remove CHOOSE() macro from libm-tests.incPaul E. Murphy2016-06-081-1/+0
| | | | | | | | | | Use gen-libm-test.pl to generate a list of macros mapping to libm-test-ulps.h as this simplifies adding new types without having to modify a growing number of static headers each time a type is added. This also removes the final usage of the TEST_(DOUBLE|FLOAT|LDOUBLE) macros. Thus, they too are removed.
* Replace M_PI2l with lit_pi_2_d in libm-test.incPaul E. Murphy2016-05-271-0/+1
| | | | | | | This is useful in situations where the long double type is less precise than the type under test. This adds a new wrapper macro LITM(x) to each type to append the proper suffix onto macro constants found in math.h.
* Begin refactor of libm-test.incPaul E. Murphy2016-05-271-0/+4
| | | | | | | | | | | Attempt to creatively redefine the macros to choose tests based on the format being tested, not the type. Note, TS 18661 does not define any printf modifiers, so we need to be a little more verbose about constructing strings to output.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Use C11 CMPLX* macros in libm tests.Joseph Myers2015-10-281-0/+1
| | | | | | | | | | | | | | | | | | libm-test.inc has a macro BUILD_COMPLEX to construct a complex number with given real and imaginary parts while allowing properly for signed zeroes, infinities and NaNs (which don't work properly with a simple real + I * imag, in the absence of compiler support for imaginary types), using assignment to __real__ and __imag__ parts of the number. C11 defines CMPLX* macros for this purpose, which GCC 4.7 and above provide suitable built-in functions for. This patch redefines BUILD_COMPLEX in terms of the standard macros. Tested for x86_64 and x86. * math/libm-test.inc (BUILD_COMPLEX): Remove macro. * math/test-double.h (BUILD_COMPLEX): New macro. * math/test-float.h (BUILD_COMPLEX): Likewise. * math/test-ldouble.h (BUILD_COMPLEX): Likewise.
* Refactor libm tests.Joseph Myers2015-06-241-0/+24
This patch refactors the libm tests using libm-test.inc to reduce the level of duplicate definitions. New headers are created for the definitions shared by tests for a particular type; by tests of inline functions; by tests of non-inline functions; by scalar tests; and by vector tests. The unused MATHCONST macro is removed. A new macro VEC_LEN is added to the vector headers to allow the macros defining wrappers for vector functions to be defined once, instead of six times each (differing only in vector length) as before. There is still scope for further refactoring, but this seems a useful start. Tested for x86_64. * math/test-double.h: New file. * math/test-float.h: Likewise. * math/test-ldouble.h: Likewise. * math/test-math-inline.h: Likewise. * math/test-math-no-inline.h: Likewise. * math/test-math-scalar.h: Likewise. * math/test-math-vector.h: Likewise. * math/test-vec-loop.h: Remove file. Contents moved into test-math-vector.h. * math/libm-test.inc (MATHCONST): Do not document macro. * math/test-double.c: Include test-double.h, test-math-no-inline.h and test-math-scalar.h. (FUNC): Remove macro. (FUNC_TEST): Likewise. (FLOAT): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_DOUBLE): Likewise. (TEST_MATHVEC): Likewise. (__NO_MATH_INLINES): Likewise. * math/test-float.c: Include test-float.h, test-math-no-inline.h and test-math-scalar.h. (FUNC): Remove macro. (FUNC_TEST): Likewise. (FLOAT): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_FLOAT): Likewise. (TEST_MATHVEC): Likewise. (__NO_MATH_INLINES): Likewise. * math/test-idouble.c: Include test-double.h, test-math-inline.h and test-math-scalar.h. (FUNC): Remove macro. (FUNC_TEST): Likewise. (FLOAT): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_DOUBLE): Likewise. (TEST_MATHVEC): Likewise. (TEST_INLINE): Likewise. (__NO_MATH_INLINES): Likewise. * math/test-ifloat.c: Include test-float.h, test-math-inline.h and test-math-scalar.h. (FUNC): Remove macro. (FUNC_TEST): Likewise. (FLOAT): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_FLOAT): Likewise. (TEST_MATHVEC): Likewise. (TEST_INLINE): Likewise. (__NO_MATH_INLINES): Likewise. * math/test-ildoubl.c: Include test-ldouble.h, test-math-inline.h and test-math-scalar.h. (FUNC): Remove macro. (FUNC_TEST): Likewise. (FLOAT): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_LDOUBLE): Likewise. (TEST_MATHVEC): Likewise. (TEST_INLINE): Likewise. (__NO_MATH_INLINES): Likewise. * math/test-ldouble.c: Include test-ldouble.h, test-math-no-inline.h and test-math-scalar.h. (FUNC): Remove macro. (FUNC_TEST): Likewise. (FLOAT): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_LDOUBLE): Likewise. (TEST_MATHVEC): Likewise. (__NO_MATH_INLINES): Likewise. * math/test-double-vlen2.h: Include test-double.h, test-math-no-inline.h and test-math-vector.h. (FLOAT): Remove macro. (FUNC): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_DOUBLE): Likewise. (TEST_MATHVEC): Likewise. (__NO_MATH_INLINES): Likewise. (CNCT): Likewise. (CONCAT): Likewise. (WRAPPER_NAME): Likewise. (WRAPPER_DECL): Likewise. (WRAPPER_DECL_ff): Likewise. (WRAPPER_DECL_fFF): Likewise. (VECTOR_WRAPPER): Likewise. (VECTOR_WRAPPER_ff): Likewise. (VECTOR_WRAPPER_fFF): Likewise. (VEC_LEN): New macro. * math/test-double-vlen4.h: Include test-double.h, test-math-no-inline.h and test-math-vector.h. (FLOAT): Remove macro. (FUNC): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_DOUBLE): Likewise. (TEST_MATHVEC): Likewise. (__NO_MATH_INLINES): Likewise. (CNCT): Likewise. (CONCAT): Likewise. (WRAPPER_NAME): Likewise. (WRAPPER_DECL): Likewise. (WRAPPER_DECL_ff): Likewise. (WRAPPER_DECL_fFF): Likewise. (VECTOR_WRAPPER): Likewise. (VECTOR_WRAPPER_ff): Likewise. (VECTOR_WRAPPER_fFF): Likewise. (VEC_LEN): New macro. * math/test-double-vlen8.h: Include test-double.h, test-math-no-inline.h and test-math-vector.h. (FLOAT): Remove macro. (FUNC): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_DOUBLE): Likewise. (TEST_MATHVEC): Likewise. (__NO_MATH_INLINES): Likewise. (CNCT): Likewise. (CONCAT): Likewise. (WRAPPER_NAME): Likewise. (WRAPPER_DECL): Likewise. (WRAPPER_DECL_ff): Likewise. (WRAPPER_DECL_fFF): Likewise. (VECTOR_WRAPPER): Likewise. (VECTOR_WRAPPER_ff): Likewise. (VECTOR_WRAPPER_fFF): Likewise. (VEC_LEN): New macro. * math/test-float-vlen4.h: Include test-float.h, test-math-no-inline.h and test-math-vector.h. (FLOAT): Remove macro. (FUNC): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_FLOAT): Likewise. (TEST_MATHVEC): Likewise. (__NO_MATH_INLINES): Likewise. (CNCT): Likewise. (CONCAT): Likewise. (WRAPPER_NAME): Likewise. (WRAPPER_DECL): Likewise. (WRAPPER_DECL_ff): Likewise. (WRAPPER_DECL_fFF): Likewise. (VECTOR_WRAPPER): Likewise. (VECTOR_WRAPPER_ff): Likewise. (VECTOR_WRAPPER_fFF): Likewise. (VEC_LEN): New macro. * math/test-float-vlen8.h: Include test-float.h, test-math-no-inline.h and test-math-vector.h. (FLOAT): Remove macro. (FUNC): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_FLOAT): Likewise. (TEST_MATHVEC): Likewise. (__NO_MATH_INLINES): Likewise. (CNCT): Likewise. (CONCAT): Likewise. (WRAPPER_NAME): Likewise. (WRAPPER_DECL): Likewise. (WRAPPER_DECL_ff): Likewise. (WRAPPER_DECL_fFF): Likewise. (VECTOR_WRAPPER): Likewise. (VECTOR_WRAPPER_ff): Likewise. (VECTOR_WRAPPER_fFF): Likewise. (VEC_LEN): New macro. * math/test-float-vlen16.h: Include test-float.h, test-math-no-inline.h and test-math-vector.h. (FLOAT): Remove macro. (FUNC): Likewise. (MATHCONST): Likewise. (PRINTF_EXPR): Likewise. (PRINTF_XEXPR): Likewise. (PRINTF_NEXPR): Likewise. (TEST_FLOAT): Likewise. (TEST_MATHVEC): Likewise. (__NO_MATH_INLINES): Likewise. (CNCT): Likewise. (CONCAT): Likewise. (WRAPPER_NAME): Likewise. (WRAPPER_DECL): Likewise. (WRAPPER_DECL_ff): Likewise. (WRAPPER_DECL_fFF): Likewise. (VECTOR_WRAPPER): Likewise. (VECTOR_WRAPPER_ff): Likewise. (VECTOR_WRAPPER_fFF): Likewise. (VEC_LEN): New macro. * sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c: Do not include test-vec-loop.h. * sysdeps/x86_64/fpu/test-double-vlen4-wrappers.c: Likewise. * sysdeps/x86_64/fpu/test-double-vlen4-avx2-wrappers.c: Likewise. * sysdeps/x86_64/fpu/test-double-vlen8-wrappers.c: Likewise. * sysdeps/x86_64/fpu/test-float-vlen4-wrappers.c: Likewise. * sysdeps/x86_64/fpu/test-float-vlen8-wrappers.c: Likewise. * sysdeps/x86_64/fpu/test-float-vlen8-avx2-wrappers.c: Likewise. * sysdeps/x86_64/fpu/test-float-vlen16-wrappers.c: Likewise.