aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c
AgeCommit message (Collapse)Author
2019-12-11Always use wordsize-64 version of s_ceil.c.Stefan Liebler
This patch replaces s_ceil.c in sysdeps/dbl-64 with the one in sysdeps/dbl-64/wordsize-64 and removes the latter one. The code is not changed except changes in code style. Also adjusted the include path in x86_64 and sparc64 files. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2018-09-17Use ceil functions not __ceil functions in glibc libm.Joseph Myers
Continuing the move to use, within libm, public names for libm functions that can be inlined as built-in functions on many architectures, this patch moves calls to __ceil functions to call the corresponding ceil names instead, with asm redirection to __ceil when the calls are not inlined. Tested for x86_64, and with build-many-glibcs.py. * include/math.h [!_ISOMAC && !(__FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0) && !NO_MATH_REDIRECT] (ceil): Redirect using MATH_REDIRECT. * sysdeps/aarch64/fpu/s_ceil.c: Define NO_MATH_REDIRECT before header inclusion. * sysdeps/aarch64/fpu/s_ceilf.c: Likewise. * sysdeps/ieee754/dbl-64/s_ceil.c: Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c: Likewise. * sysdeps/ieee754/float128/s_ceilf128.c: Likewise. * sysdeps/ieee754/flt-32/s_ceilf.c: Likewise. * sysdeps/ieee754/ldbl-128/s_ceill.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_ceil_template.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/riscv/rv64/rvd/s_ceil.c: Likewise. * sysdeps/riscv/rvf/s_ceilf.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_ceil.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_ceilf.c: Likewise. * sysdeps/powerpc/fpu/math_private.h [_ARCH_PWR5X] (__ceil): Remove macro. * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Use ceil functions instead of __ceil variants. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_truncl.c (__truncl): Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Likewise. * sysdeps/powerpc/power5+/fpu/s_modf.c (__modf): Likewise. * sysdeps/powerpc/power5+/fpu/s_modff.c (__modff): Likewise.
2017-10-03Use libm_alias_double for more dbl-64 functions.Joseph Myers
This patch makes more dbl-64 functions use libm_alias_double to define function aliases. Specifically, it makes the change for functions with dbl-64/wordsize-64 versions, changing both the dbl-64 and dbl-64/wordsize-64 versions and removing the ldbl-opt wrappers. Functions are excluded from this patch if there are complications because of versions of those functions also present in libc, or architecture-specific wrappers round these files. Tested for x86_64, and with build-many-glibcs.py. Installed stripped shared libraries are unchanged except for alpha (where increased use of dbl-64/wordsize-64 files, where previously ldbl-opt files that wrapped dbl-64 files were used, was expected to result in different, better code). * sysdeps/ieee754/dbl-64/s_ceil.c: Include <libm-alias-double.h>. (ceil): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_floor.c: Include <libm-alias-double.h>. (floor): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_llround.c: Include <libm-alias-double.h>. (llround): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_lround.c: Include <libm-alias-double.h>. (lround): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_nearbyint.c: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_remquo.c: Include <libm-alias-double.h>. (remquo): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_rint.c: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_round.c: Include <libm-alias-double.h>. (round): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/s_trunc.c: Include <libm-alias-double.h>. (trunc): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c: Include <libm-alias-double.h>. (ceil): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c: Include <libm-alias-double.h>. (floor): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c: Include <libm-alias-double.h>. (llround): Define using libm_alias_double. [_LP64] (lround): Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c: Include <libm-alias-double.h>. [!_LP64] (lround): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c: Include <libm-alias-double.h>. (remquo): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_round.c: Include <libm-alias-double.h>. (round): Define using libm_alias_double. * sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c: Include <libm-alias-double.h>. (trunc): Define using libm_alias_double. * sysdeps/ieee754/ldbl-opt/s_ceil.c: Remove file. * sysdeps/ieee754/ldbl-opt/s_floor.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_llround.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_lround.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_nearbyint.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_remquo.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_rint.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_round.c: Likewise. * sysdeps/ieee754/ldbl-opt/s_trunc.c: Likewise.
2016-05-24Do not raise "inexact" from generic ceil (bug 15479).Joseph Myers
C99 and C11 allow but do not require ceil, floor, round and trunc to raise the "inexact" exception for noninteger arguments. TS 18661-1 requires that this exception not be raised by these functions. This aligns them with general IEEE semantics, where "inexact" is only raised if the final step of rounding the infinite-precision result to the result type is inexact; for these functions, the infinite-precision integer result is always representable in the result type, so "inexact" should never be raised. The generic implementations of ceil, floor and round functions contain code to force "inexact" to be raised. This patch removes it for ceil functions to align them with TS 18661-1 in this regard. Note that some architecture-specific versions may still raise "inexact", so the tests are not updated and the bug is not yet fixed. Tested for x86_64, x86 and mips64. [BZ #15479] * sysdeps/ieee754/dbl-64/s_ceil.c: Do not mention "inexact" exception in comment. (huge): Remove variable. (__ceil): Do not force "inexact" exception. * sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c: Do not mention "inexact" exception in comment. (huge): Remove variable. (__ceil): Do not force "inexact" exception. * sysdeps/ieee754/flt-32/s_ceilf.c (huge): Remove variable. (__ceilf): Do not force "inexact" exception. * sysdeps/ieee754/ldbl-128/s_ceill.c: Do not mention "inexact" exception in comment. (huge): Remove variable. (__ceill): Do not force "inexact" exception.
2012-03-09Use <> for math.h and math_private.h everywhere.Richard Henderson
Entire tree edited via find | grep | sed.
2011-10-25Use math_force_eval in more placesUlrich Drepper
2011-10-16Use rounds{s,d} for x86 rint, ceil, floorUlrich Drepper
2009-08-24Add ceil implementation for 64-bit machines.Ulrich Drepper
On 64-bit machines we should not split doubles into two 32 bit integer and handle the words separately. We have wide registers. This patch implements a 64-bit ceil version. Ideally all other functions will be converted over time.