1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Consistently use uintN_t not u_intN_t in libm.

This patch changes libm code to make consistent use of C99 uintN_t
types instead of sometimes using those and sometimes using the older
nonstandard u_intN_t names.  This makes sense as a cleanup in its own
right, and also facilitates merges to GCC's libquadmath (which gets
the types from stdint.h and so may not have u_intN_t available at
all).

Tested for x86_64, and with build-many-glibcs.py.

	* math/s_nextafter.c (__nextafter): Use uintN_t instead of
	u_intN_t.
	* math/s_nexttowardf.c (__nexttowardf): Likewise.
	* sysdeps/generic/math_private.h (ieee_double_shape_type):
	Likewise.
	(ieee_float_shape_type): Likewise.
	* sysdeps/i386/fpu/s_fpclassifyl.c (__fpclassifyl): Likewise.
	* sysdeps/i386/fpu/s_isnanl.c (__isnanl): Likewise.
	* sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Likewise.
	* sysdeps/i386/fpu/s_nexttoward.c (__nexttoward): Likewise.
	* sysdeps/i386/fpu/s_nexttowardf.c (__nexttowardf): Likewise.
	* sysdeps/ieee754/dbl-64/e_acosh.c (__ieee754_acosh): Likewise.
	* sysdeps/ieee754/dbl-64/e_cosh.c (__ieee754_cosh): Likewise.
	* sysdeps/ieee754/dbl-64/e_fmod.c (__ieee754_fmod): Likewise.
	* sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r):
	Likewise.
	* sysdeps/ieee754/dbl-64/e_hypot.c (__ieee754_hypot): Likewise.
	* sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise.
	(__ieee754_yn): Likewise.
	* sysdeps/ieee754/dbl-64/e_log10.c (__ieee754_log10): Likewise.
	* sysdeps/ieee754/dbl-64/e_log2.c (__ieee754_log2): Likewise.
	* sysdeps/ieee754/dbl-64/e_rem_pio2.c (__ieee754_rem_pio2):
	Likewise.
	* sysdeps/ieee754/dbl-64/e_sinh.c (__ieee754_sinh): Likewise.
	* sysdeps/ieee754/dbl-64/s_ceil.c (__ceil): Likewise.
	* sysdeps/ieee754/dbl-64/s_copysign.c (__copysign): Likewise.
	* sysdeps/ieee754/dbl-64/s_erf.c (__erf): Likewise.
	(__erfc): Likewise.
	* sysdeps/ieee754/dbl-64/s_expm1.c (__expm1): Likewise.
	* sysdeps/ieee754/dbl-64/s_finite.c (FINITE): Likewise.
	* sysdeps/ieee754/dbl-64/s_floor.c (__floor): Likewise.
	* sysdeps/ieee754/dbl-64/s_fpclassify.c (__fpclassify): Likewise.
	* sysdeps/ieee754/dbl-64/s_isnan.c (__isnan): Likewise.
	* sysdeps/ieee754/dbl-64/s_issignaling.c (__issignaling):
	Likewise.
	* sysdeps/ieee754/dbl-64/s_llrint.c (__llrint): Likewise.
	* sysdeps/ieee754/dbl-64/s_llround.c (__llround): Likewise.
	* sysdeps/ieee754/dbl-64/s_lrint.c (__lrint): Likewise.
	* sysdeps/ieee754/dbl-64/s_lround.c (__lround): Likewise.
	* sysdeps/ieee754/dbl-64/s_modf.c (__modf): Likewise.
	* sysdeps/ieee754/dbl-64/s_nextup.c (__nextup): Likewise.
	* sysdeps/ieee754/dbl-64/s_remquo.c (__remquo): Likewise.
	* sysdeps/ieee754/dbl-64/s_round.c (__round): Likewise.
	* sysdeps/ieee754/dbl-64/s_trunc.c (__trunc): Likewise.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_issignaling.c
	(__issignaling): Likewise.
	* sysdeps/ieee754/flt-32/e_atan2f.c (__ieee754_atan2f): Likewise.
	* sysdeps/ieee754/flt-32/e_fmodf.c (__ieee754_fmodf): Likewise.
	* sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r):
	Likewise.
	* sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_ynf): Likewise.
	* sysdeps/ieee754/flt-32/e_log10f.c (__ieee754_log10f): Likewise.
	* sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): Likewise.
	* sysdeps/ieee754/flt-32/e_rem_pio2f.c (__ieee754_rem_pio2f):
	Likewise.
	* sysdeps/ieee754/flt-32/e_remainderf.c (__ieee754_remainderf):
	Likewise.
	* sysdeps/ieee754/flt-32/e_sqrtf.c (__ieee754_sqrtf): Likewise.
	* sysdeps/ieee754/flt-32/s_ceilf.c (__ceilf): Likewise.
	* sysdeps/ieee754/flt-32/s_copysignf.c (__copysignf): Likewise.
	* sysdeps/ieee754/flt-32/s_erff.c (__erff): Likewise.
	(__erfcf): Likewise.
	* sysdeps/ieee754/flt-32/s_expm1f.c (__expm1f): Likewise.
	* sysdeps/ieee754/flt-32/s_finitef.c (FINITEF): Likewise.
	* sysdeps/ieee754/flt-32/s_floorf.c (__floorf): Likewise.
	* sysdeps/ieee754/flt-32/s_fpclassifyf.c (__fpclassifyf):
	Likewise.
	* sysdeps/ieee754/flt-32/s_isnanf.c (__isnanf): Likewise.
	* sysdeps/ieee754/flt-32/s_issignalingf.c (__issignalingf):
	Likewise.
	* sysdeps/ieee754/flt-32/s_llrintf.c (__llrintf): Likewise.
	* sysdeps/ieee754/flt-32/s_llroundf.c (__llroundf): Likewise.
	* sysdeps/ieee754/flt-32/s_lrintf.c (__lrintf): Likewise.
	* sysdeps/ieee754/flt-32/s_lroundf.c (__lroundf): Likewise.
	* sysdeps/ieee754/flt-32/s_modff.c (__modff): Likewise.
	* sysdeps/ieee754/flt-32/s_remquof.c (__remquof): Likewise.
	* sysdeps/ieee754/flt-32/s_roundf.c (__roundf): Likewise.
	* sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl):
	Likewise.
	* sysdeps/ieee754/ldbl-128/e_atan2l.c (__ieee754_atan2l):
	Likewise.
	* sysdeps/ieee754/ldbl-128/e_atanhl.c (__ieee754_atanhl):
	Likewise.
	* sysdeps/ieee754/ldbl-128/e_fmodl.c (__ieee754_fmodl): Likewise.
	* sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r):
	Likewise.
	* sysdeps/ieee754/ldbl-128/e_hypotl.c (__ieee754_hypotl):
	Likewise.
	* sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
	(__ieee754_ynl): Likewise.
	* sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Likewise.
	* sysdeps/ieee754/ldbl-128/e_rem_pio2l.c (__ieee754_rem_pio2l):
	Likewise.
	* sysdeps/ieee754/ldbl-128/e_remainderl.c (__ieee754_remainderl):
	Likewise.
	* sysdeps/ieee754/ldbl-128/e_sinhl.c (__ieee754_sinhl): Likewise.
	* sysdeps/ieee754/ldbl-128/k_cosl.c (__kernel_cosl): Likewise.
	* sysdeps/ieee754/ldbl-128/k_sincosl.c (__kernel_sincosl):
	Likewise.
	* sysdeps/ieee754/ldbl-128/k_sinl.c (__kernel_sinl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_ceill.c (__ceill): Likewise.
	* sysdeps/ieee754/ldbl-128/s_copysignl.c (__copysignl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_fabsl.c (__fabsl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_finitel.c (__finitel): Likewise.
	* sysdeps/ieee754/ldbl-128/s_floorl.c (__floorl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_fpclassifyl.c (__fpclassifyl):
	Likewise.
	* sysdeps/ieee754/ldbl-128/s_frexpl.c (__frexpl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_isnanl.c (__isnanl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_issignalingl.c (__issignalingl):
	Likewise.
	* sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_llroundl.c (__llroundl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_lroundl.c (__lroundl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_modfl.c (__modfl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_nearbyintl.c (__nearbyintl):
	Likewise.
	* sysdeps/ieee754/ldbl-128/s_nextafterl.c (__nextafterl):
	Likewise.
	* sysdeps/ieee754/ldbl-128/s_nexttoward.c (__nexttoward):
	Likewise.
	* sysdeps/ieee754/ldbl-128/s_nexttowardf.c (__nexttowardf):
	Likewise.
	* sysdeps/ieee754/ldbl-128/s_nextupl.c (__nextupl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_remquol.c (__remquol): Likewise.
	* sysdeps/ieee754/ldbl-128/s_rintl.c (__rintl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_roundl.c (__roundl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_tanhl.c (__tanhl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_truncl.c (__truncl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl):
	Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r):
	Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c (__ieee754_rem_pio2l):
	Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_remainderl.c
	(__ieee754_remainderl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/k_cosl.c (__kernel_cosl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/k_sinl.c (__kernel_sinl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fabsl.c (__fabsl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c (___fpclassifyl):
	Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_modfl.c (__modfl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c (__nexttowardf):
	Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise.
	* sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_asinl.c (__ieee754_asinl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_atanhl.c (__ieee754_atanhl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_coshl.c (__ieee754_coshl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r):
	Likewise.
	* sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_j0l.c (__ieee754_j0l): Likewise.
	(__ieee754_y0l): Likewise.
	(pzero): Likewise.
	(qzero): Likewise.
	* sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_j1l): Likewise.
	(__ieee754_y1l): Likewise.
	(pone): Likewise.
	(qone): Likewise.
	* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise.
	(__ieee754_ynl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_lgammal_r.c (sin_pi): Likewise.
	(__ieee754_lgammal_r): Likewise.
	* sysdeps/ieee754/ldbl-96/e_rem_pio2l.c (__ieee754_rem_pio2l):
	Likewise.
	* sysdeps/ieee754/ldbl-96/e_sinhl.c (__ieee754_sinhl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_copysignl.c (__copysignl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_erfl.c (__erfl): Likewise.
	(__erfcl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_frexpl.c (__frexpl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_issignalingl.c (__issignalingl):
	Likewise.
	* sysdeps/ieee754/ldbl-96/s_llrintl.c (__llrintl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_llroundl.c (__llroundl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_lrintl.c (__lrintl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_lroundl.c (__lroundl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_modfl.c (__modfl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Likewise.
	* sysdeps/ieee754/ldbl-96/s_nexttowardf.c (__nexttowardf):
	Likewise.
	* sysdeps/ieee754/ldbl-96/s_nextupl.c (__nextupl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Likewise.
	* sysdeps/ieee754/ldbl-96/s_roundl.c (__roundl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Likewise.
	* sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c (__nldbl_nexttowardf):
	Likewise.
	* sysdeps/m68k/m680x0/fpu/e_pow.c (s(__ieee754_pow)): Likewise.
	* sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c (__fpclassifyl):
	Likewise.
	* sysdeps/m68k/m680x0/fpu/s_llrint.c (__llrint): Likewise.
	* sysdeps/m68k/m680x0/fpu/s_llrintf.c (__llrintf): Likewise.
	* sysdeps/m68k/m680x0/fpu/s_llrintl.c (__llrintl): Likewise.
	* sysdeps/m68k/m680x0/fpu/s_nextafterl.c (__nextafterl): Likewise.
	* sysdeps/x86/fpu/powl_helper.c (__powl_helper): Likewise.
This commit is contained in:
Joseph Myers
2017-08-03 19:55:04 +00:00
parent 08897a57a8
commit 24ab7723b8
149 changed files with 453 additions and 251 deletions

202
ChangeLog
View File

@ -1,3 +1,205 @@
2017-08-03 Joseph Myers <joseph@codesourcery.com>
* math/s_nextafter.c (__nextafter): Use uintN_t instead of
u_intN_t.
* math/s_nexttowardf.c (__nexttowardf): Likewise.
* sysdeps/generic/math_private.h (ieee_double_shape_type):
Likewise.
(ieee_float_shape_type): Likewise.
* sysdeps/i386/fpu/s_fpclassifyl.c (__fpclassifyl): Likewise.
* sysdeps/i386/fpu/s_isnanl.c (__isnanl): Likewise.
* sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Likewise.
* sysdeps/i386/fpu/s_nexttoward.c (__nexttoward): Likewise.
* sysdeps/i386/fpu/s_nexttowardf.c (__nexttowardf): Likewise.
* sysdeps/ieee754/dbl-64/e_acosh.c (__ieee754_acosh): Likewise.
* sysdeps/ieee754/dbl-64/e_cosh.c (__ieee754_cosh): Likewise.
* sysdeps/ieee754/dbl-64/e_fmod.c (__ieee754_fmod): Likewise.
* sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r):
Likewise.
* sysdeps/ieee754/dbl-64/e_hypot.c (__ieee754_hypot): Likewise.
* sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise.
(__ieee754_yn): Likewise.
* sysdeps/ieee754/dbl-64/e_log10.c (__ieee754_log10): Likewise.
* sysdeps/ieee754/dbl-64/e_log2.c (__ieee754_log2): Likewise.
* sysdeps/ieee754/dbl-64/e_rem_pio2.c (__ieee754_rem_pio2):
Likewise.
* sysdeps/ieee754/dbl-64/e_sinh.c (__ieee754_sinh): Likewise.
* sysdeps/ieee754/dbl-64/s_ceil.c (__ceil): Likewise.
* sysdeps/ieee754/dbl-64/s_copysign.c (__copysign): Likewise.
* sysdeps/ieee754/dbl-64/s_erf.c (__erf): Likewise.
(__erfc): Likewise.
* sysdeps/ieee754/dbl-64/s_expm1.c (__expm1): Likewise.
* sysdeps/ieee754/dbl-64/s_finite.c (FINITE): Likewise.
* sysdeps/ieee754/dbl-64/s_floor.c (__floor): Likewise.
* sysdeps/ieee754/dbl-64/s_fpclassify.c (__fpclassify): Likewise.
* sysdeps/ieee754/dbl-64/s_isnan.c (__isnan): Likewise.
* sysdeps/ieee754/dbl-64/s_issignaling.c (__issignaling):
Likewise.
* sysdeps/ieee754/dbl-64/s_llrint.c (__llrint): Likewise.
* sysdeps/ieee754/dbl-64/s_llround.c (__llround): Likewise.
* sysdeps/ieee754/dbl-64/s_lrint.c (__lrint): Likewise.
* sysdeps/ieee754/dbl-64/s_lround.c (__lround): Likewise.
* sysdeps/ieee754/dbl-64/s_modf.c (__modf): Likewise.
* sysdeps/ieee754/dbl-64/s_nextup.c (__nextup): Likewise.
* sysdeps/ieee754/dbl-64/s_remquo.c (__remquo): Likewise.
* sysdeps/ieee754/dbl-64/s_round.c (__round): Likewise.
* sysdeps/ieee754/dbl-64/s_trunc.c (__trunc): Likewise.
* sysdeps/ieee754/dbl-64/wordsize-64/s_issignaling.c
(__issignaling): Likewise.
* sysdeps/ieee754/flt-32/e_atan2f.c (__ieee754_atan2f): Likewise.
* sysdeps/ieee754/flt-32/e_fmodf.c (__ieee754_fmodf): Likewise.
* sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r):
Likewise.
* sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_ynf): Likewise.
* sysdeps/ieee754/flt-32/e_log10f.c (__ieee754_log10f): Likewise.
* sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): Likewise.
* sysdeps/ieee754/flt-32/e_rem_pio2f.c (__ieee754_rem_pio2f):
Likewise.
* sysdeps/ieee754/flt-32/e_remainderf.c (__ieee754_remainderf):
Likewise.
* sysdeps/ieee754/flt-32/e_sqrtf.c (__ieee754_sqrtf): Likewise.
* sysdeps/ieee754/flt-32/s_ceilf.c (__ceilf): Likewise.
* sysdeps/ieee754/flt-32/s_copysignf.c (__copysignf): Likewise.
* sysdeps/ieee754/flt-32/s_erff.c (__erff): Likewise.
(__erfcf): Likewise.
* sysdeps/ieee754/flt-32/s_expm1f.c (__expm1f): Likewise.
* sysdeps/ieee754/flt-32/s_finitef.c (FINITEF): Likewise.
* sysdeps/ieee754/flt-32/s_floorf.c (__floorf): Likewise.
* sysdeps/ieee754/flt-32/s_fpclassifyf.c (__fpclassifyf):
Likewise.
* sysdeps/ieee754/flt-32/s_isnanf.c (__isnanf): Likewise.
* sysdeps/ieee754/flt-32/s_issignalingf.c (__issignalingf):
Likewise.
* sysdeps/ieee754/flt-32/s_llrintf.c (__llrintf): Likewise.
* sysdeps/ieee754/flt-32/s_llroundf.c (__llroundf): Likewise.
* sysdeps/ieee754/flt-32/s_lrintf.c (__lrintf): Likewise.
* sysdeps/ieee754/flt-32/s_lroundf.c (__lroundf): Likewise.
* sysdeps/ieee754/flt-32/s_modff.c (__modff): Likewise.
* sysdeps/ieee754/flt-32/s_remquof.c (__remquof): Likewise.
* sysdeps/ieee754/flt-32/s_roundf.c (__roundf): Likewise.
* sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl):
Likewise.
* sysdeps/ieee754/ldbl-128/e_atan2l.c (__ieee754_atan2l):
Likewise.
* sysdeps/ieee754/ldbl-128/e_atanhl.c (__ieee754_atanhl):
Likewise.
* sysdeps/ieee754/ldbl-128/e_fmodl.c (__ieee754_fmodl): Likewise.
* sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r):
Likewise.
* sysdeps/ieee754/ldbl-128/e_hypotl.c (__ieee754_hypotl):
Likewise.
* sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
(__ieee754_ynl): Likewise.
* sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Likewise.
* sysdeps/ieee754/ldbl-128/e_rem_pio2l.c (__ieee754_rem_pio2l):
Likewise.
* sysdeps/ieee754/ldbl-128/e_remainderl.c (__ieee754_remainderl):
Likewise.
* sysdeps/ieee754/ldbl-128/e_sinhl.c (__ieee754_sinhl): Likewise.
* sysdeps/ieee754/ldbl-128/k_cosl.c (__kernel_cosl): Likewise.
* sysdeps/ieee754/ldbl-128/k_sincosl.c (__kernel_sincosl):
Likewise.
* sysdeps/ieee754/ldbl-128/k_sinl.c (__kernel_sinl): Likewise.
* sysdeps/ieee754/ldbl-128/s_ceill.c (__ceill): Likewise.
* sysdeps/ieee754/ldbl-128/s_copysignl.c (__copysignl): Likewise.
* sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Likewise.
* sysdeps/ieee754/ldbl-128/s_fabsl.c (__fabsl): Likewise.
* sysdeps/ieee754/ldbl-128/s_finitel.c (__finitel): Likewise.
* sysdeps/ieee754/ldbl-128/s_floorl.c (__floorl): Likewise.
* sysdeps/ieee754/ldbl-128/s_fpclassifyl.c (__fpclassifyl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_frexpl.c (__frexpl): Likewise.
* sysdeps/ieee754/ldbl-128/s_isnanl.c (__isnanl): Likewise.
* sysdeps/ieee754/ldbl-128/s_issignalingl.c (__issignalingl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Likewise.
* sysdeps/ieee754/ldbl-128/s_llroundl.c (__llroundl): Likewise.
* sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Likewise.
* sysdeps/ieee754/ldbl-128/s_lroundl.c (__lroundl): Likewise.
* sysdeps/ieee754/ldbl-128/s_modfl.c (__modfl): Likewise.
* sysdeps/ieee754/ldbl-128/s_nearbyintl.c (__nearbyintl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_nextafterl.c (__nextafterl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttoward.c (__nexttoward):
Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttowardf.c (__nexttowardf):
Likewise.
* sysdeps/ieee754/ldbl-128/s_nextupl.c (__nextupl): Likewise.
* sysdeps/ieee754/ldbl-128/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-128/s_rintl.c (__rintl): Likewise.
* sysdeps/ieee754/ldbl-128/s_roundl.c (__roundl): Likewise.
* sysdeps/ieee754/ldbl-128/s_tanhl.c (__tanhl): Likewise.
* sysdeps/ieee754/ldbl-128/s_truncl.c (__truncl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c (__ieee754_rem_pio2l):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_remainderl.c
(__ieee754_remainderl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/k_cosl.c (__kernel_cosl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/k_sinl.c (__kernel_sinl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_fabsl.c (__fabsl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c (___fpclassifyl):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_modfl.c (__modfl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c (__nexttowardf):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Likewise.
* sysdeps/ieee754/ldbl-96/e_asinl.c (__ieee754_asinl): Likewise.
* sysdeps/ieee754/ldbl-96/e_atanhl.c (__ieee754_atanhl): Likewise.
* sysdeps/ieee754/ldbl-96/e_coshl.c (__ieee754_coshl): Likewise.
* sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r):
Likewise.
* sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Likewise.
* sysdeps/ieee754/ldbl-96/e_j0l.c (__ieee754_j0l): Likewise.
(__ieee754_y0l): Likewise.
(pzero): Likewise.
(qzero): Likewise.
* sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_j1l): Likewise.
(__ieee754_y1l): Likewise.
(pone): Likewise.
(qone): Likewise.
* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise.
(__ieee754_ynl): Likewise.
* sysdeps/ieee754/ldbl-96/e_lgammal_r.c (sin_pi): Likewise.
(__ieee754_lgammal_r): Likewise.
* sysdeps/ieee754/ldbl-96/e_rem_pio2l.c (__ieee754_rem_pio2l):
Likewise.
* sysdeps/ieee754/ldbl-96/e_sinhl.c (__ieee754_sinhl): Likewise.
* sysdeps/ieee754/ldbl-96/s_copysignl.c (__copysignl): Likewise.
* sysdeps/ieee754/ldbl-96/s_erfl.c (__erfl): Likewise.
(__erfcl): Likewise.
* sysdeps/ieee754/ldbl-96/s_frexpl.c (__frexpl): Likewise.
* sysdeps/ieee754/ldbl-96/s_issignalingl.c (__issignalingl):
Likewise.
* sysdeps/ieee754/ldbl-96/s_llrintl.c (__llrintl): Likewise.
* sysdeps/ieee754/ldbl-96/s_llroundl.c (__llroundl): Likewise.
* sysdeps/ieee754/ldbl-96/s_lrintl.c (__lrintl): Likewise.
* sysdeps/ieee754/ldbl-96/s_lroundl.c (__lroundl): Likewise.
* sysdeps/ieee754/ldbl-96/s_modfl.c (__modfl): Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttowardf.c (__nexttowardf):
Likewise.
* sysdeps/ieee754/ldbl-96/s_nextupl.c (__nextupl): Likewise.
* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-96/s_roundl.c (__roundl): Likewise.
* sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Likewise.
* sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c (__nldbl_nexttowardf):
Likewise.
* sysdeps/m68k/m680x0/fpu/e_pow.c (s(__ieee754_pow)): Likewise.
* sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c (__fpclassifyl):
Likewise.
* sysdeps/m68k/m680x0/fpu/s_llrint.c (__llrint): Likewise.
* sysdeps/m68k/m680x0/fpu/s_llrintf.c (__llrintf): Likewise.
* sysdeps/m68k/m680x0/fpu/s_llrintl.c (__llrintl): Likewise.
* sysdeps/m68k/m680x0/fpu/s_nextafterl.c (__nextafterl): Likewise.
* sysdeps/x86/fpu/powl_helper.c (__powl_helper): Likewise.
2017-08-03 Florian Weimer <fweimer@redhat.com> 2017-08-03 Florian Weimer <fweimer@redhat.com>
[BZ #21885] [BZ #21885]

View File

@ -33,7 +33,7 @@ static char rcsid[] = "$NetBSD: s_nextafter.c,v 1.8 1995/05/10 20:47:58 jtc Exp
double __nextafter(double x, double y) double __nextafter(double x, double y)
{ {
int32_t hx,hy,ix,iy; int32_t hx,hy,ix,iy;
u_int32_t lx,ly; uint32_t lx,ly;
EXTRACT_WORDS(hx,lx,x); EXTRACT_WORDS(hx,lx,x);
EXTRACT_WORDS(hy,ly,y); EXTRACT_WORDS(hy,ly,y);

View File

@ -28,7 +28,7 @@
float __nexttowardf(float x, long double y) float __nexttowardf(float x, long double y)
{ {
int32_t hx,hy,ix,iy; int32_t hx,hy,ix,iy;
u_int32_t ly; uint32_t ly;
GET_FLOAT_WORD(hx,x); GET_FLOAT_WORD(hx,x);
EXTRACT_WORDS(hy,ly,y); EXTRACT_WORDS(hy,ly,y);
@ -41,7 +41,7 @@ float __nexttowardf(float x, long double y)
if((long double) x==y) return y; /* x=y, return y */ if((long double) x==y) return y; /* x=y, return y */
if(ix==0) { /* x == 0 */ if(ix==0) { /* x == 0 */
float u; float u;
SET_FLOAT_WORD(x,(u_int32_t)(hy&0x80000000)|1);/* return +-minsub*/ SET_FLOAT_WORD(x,(uint32_t)(hy&0x80000000)|1);/* return +-minsub*/
u = math_opt_barrier (x); u = math_opt_barrier (x);
u = u * u; u = u * u;
math_force_eval (u); /* raise underflow flag */ math_force_eval (u); /* raise underflow flag */

View File

@ -47,8 +47,8 @@ typedef union
double value; double value;
struct struct
{ {
u_int32_t msw; uint32_t msw;
u_int32_t lsw; uint32_t lsw;
} parts; } parts;
uint64_t word; uint64_t word;
} ieee_double_shape_type; } ieee_double_shape_type;
@ -62,8 +62,8 @@ typedef union
double value; double value;
struct struct
{ {
u_int32_t lsw; uint32_t lsw;
u_int32_t msw; uint32_t msw;
} parts; } parts;
uint64_t word; uint64_t word;
} ieee_double_shape_type; } ieee_double_shape_type;
@ -161,7 +161,7 @@ do { \
typedef union typedef union
{ {
float value; float value;
u_int32_t word; uint32_t word;
} ieee_float_shape_type; } ieee_float_shape_type;
/* Get a 32 bit int from a float. */ /* Get a 32 bit int from a float. */

View File

@ -25,7 +25,7 @@
int int
__fpclassifyl (long double x) __fpclassifyl (long double x)
{ {
u_int32_t ex, hx, lx; uint32_t ex, hx, lx;
int retval = FP_NORMAL; int retval = FP_NORMAL;
GET_LDOUBLE_WORDS (ex, hx, lx, x); GET_LDOUBLE_WORDS (ex, hx, lx, x);

View File

@ -35,9 +35,9 @@ int __isnanl(long double x)
extended format has the normally implicit 1 explicit extended format has the normally implicit 1 explicit
present. Sigh! */ present. Sigh! */
lx |= hx & 0x7fffffff; lx |= hx & 0x7fffffff;
se |= (u_int32_t)(lx|(-lx))>>31; se |= (uint32_t)(lx|(-lx))>>31;
se = 0xfffe - se; se = 0xfffe - se;
return (int)((u_int32_t)(se))>>16; return (int)((uint32_t)(se))>>16;
} }
hidden_def (__isnanl) hidden_def (__isnanl)
weak_alias (__isnanl, isnanl) weak_alias (__isnanl, isnanl)

View File

@ -32,8 +32,8 @@ static char rcsid[] = "$NetBSD: $";
long double __nextafterl(long double x, long double y) long double __nextafterl(long double x, long double y)
{ {
u_int32_t hx,hy,ix,iy; uint32_t hx,hy,ix,iy;
u_int32_t lx,ly; uint32_t lx,ly;
int32_t esx,esy; int32_t esx,esy;
GET_LDOUBLE_WORDS(esx,hx,lx,x); GET_LDOUBLE_WORDS(esx,hx,lx,x);

View File

@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: $";
double __nexttoward(double x, long double y) double __nexttoward(double x, long double y)
{ {
int32_t hx,ix,iy; int32_t hx,ix,iy;
u_int32_t lx,hy,ly,esy; uint32_t lx,hy,ly,esy;
EXTRACT_WORDS(hx,lx,x); EXTRACT_WORDS(hx,lx,x);
GET_LDOUBLE_WORDS(esy,hy,ly,y); GET_LDOUBLE_WORDS(esy,hy,ly,y);

View File

@ -26,7 +26,7 @@ static char rcsid[] = "$NetBSD: $";
float __nexttowardf(float x, long double y) float __nexttowardf(float x, long double y)
{ {
int32_t hx,ix,iy; int32_t hx,ix,iy;
u_int32_t hy,ly,esy; uint32_t hy,ly,esy;
GET_FLOAT_WORD(hx,x); GET_FLOAT_WORD(hx,x);
GET_LDOUBLE_WORDS(esy,hy,ly,y); GET_LDOUBLE_WORDS(esy,hy,ly,y);

View File

@ -36,7 +36,7 @@ __ieee754_acosh (double x)
{ {
double t; double t;
int32_t hx; int32_t hx;
u_int32_t lx; uint32_t lx;
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);
if (hx < 0x3ff00000) /* x < 1 */ if (hx < 0x3ff00000) /* x < 1 */
{ {

View File

@ -41,7 +41,7 @@ __ieee754_cosh (double x)
{ {
double t, w; double t, w;
int32_t ix; int32_t ix;
u_int32_t lx; uint32_t lx;
/* High word of |x|. */ /* High word of |x|. */
GET_HIGH_WORD (ix, x); GET_HIGH_WORD (ix, x);
@ -71,7 +71,7 @@ __ieee754_cosh (double x)
/* |x| in [log(maxdouble), overflowthresold] */ /* |x| in [log(maxdouble), overflowthresold] */
GET_LOW_WORD (lx, x); GET_LOW_WORD (lx, x);
if (ix < 0x408633ce || ((ix == 0x408633ce) && (lx <= (u_int32_t) 0x8fb9f87d))) if (ix < 0x408633ce || ((ix == 0x408633ce) && (lx <= (uint32_t) 0x8fb9f87d)))
{ {
w = __ieee754_exp (half * fabs (x)); w = __ieee754_exp (half * fabs (x));
t = half * w; t = half * w;

View File

@ -24,7 +24,7 @@ double
__ieee754_fmod (double x, double y) __ieee754_fmod (double x, double y)
{ {
int32_t n, hx, hy, hz, ix, iy, sx, i; int32_t n, hx, hy, hz, ix, iy, sx, i;
u_int32_t lx, ly, lz; uint32_t lx, ly, lz;
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);
EXTRACT_WORDS (hy, ly, y); EXTRACT_WORDS (hy, ly, y);
@ -41,7 +41,7 @@ __ieee754_fmod (double x, double y)
if ((hx < hy) || (lx < ly)) if ((hx < hy) || (lx < ly))
return x; /* |x|<|y| return x */ return x; /* |x|<|y| return x */
if (lx == ly) if (lx == ly)
return Zero[(u_int32_t) sx >> 31]; /* |x|=|y| return x*0*/ return Zero[(uint32_t) sx >> 31]; /* |x|=|y| return x*0*/
} }
/* determine ix = ilogb(x) */ /* determine ix = ilogb(x) */
@ -125,7 +125,7 @@ __ieee754_fmod (double x, double y)
else else
{ {
if ((hz | lz) == 0) /* return sign(x)*0 */ if ((hz | lz) == 0) /* return sign(x)*0 */
return Zero[(u_int32_t) sx >> 31]; return Zero[(uint32_t) sx >> 31];
hx = hz + hz + (lz >> 31); lx = lz + lz; hx = hz + hz + (lz >> 31); lx = lz + lz;
} }
} }
@ -138,7 +138,7 @@ __ieee754_fmod (double x, double y)
/* convert back to floating value and restore the sign */ /* convert back to floating value and restore the sign */
if ((hx | lx) == 0) /* return sign(x)*0 */ if ((hx | lx) == 0) /* return sign(x)*0 */
return Zero[(u_int32_t) sx >> 31]; return Zero[(uint32_t) sx >> 31];
while (hx < 0x00100000) /* normalize x */ while (hx < 0x00100000) /* normalize x */
{ {
hx = hx + hx + (lx >> 31); lx = lx + lx; hx = hx + hx + (lx >> 31); lx = lx + lx;
@ -154,7 +154,7 @@ __ieee754_fmod (double x, double y)
n = -1022 - iy; n = -1022 - iy;
if (n <= 20) if (n <= 20)
{ {
lx = (lx >> n) | ((u_int32_t) hx << (32 - n)); lx = (lx >> n) | ((uint32_t) hx << (32 - n));
hx >>= n; hx >>= n;
} }
else if (n <= 31) else if (n <= 31)

View File

@ -114,7 +114,7 @@ double
__ieee754_gamma_r (double x, int *signgamp) __ieee754_gamma_r (double x, int *signgamp)
{ {
int32_t hx; int32_t hx;
u_int32_t lx; uint32_t lx;
double ret; double ret;
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);
@ -126,7 +126,7 @@ __ieee754_gamma_r (double x, int *signgamp)
return 1.0 / x; return 1.0 / x;
} }
if (__builtin_expect (hx < 0, 0) if (__builtin_expect (hx < 0, 0)
&& (u_int32_t) hx < 0xfff00000 && __rint (x) == x) && (uint32_t) hx < 0xfff00000 && __rint (x) == x)
{ {
/* Return value for integer x < 0 is NaN with invalid exception. */ /* Return value for integer x < 0 is NaN with invalid exception. */
*signgamp = 0; *signgamp = 0;

View File

@ -74,7 +74,7 @@ __ieee754_hypot (double x, double y)
{ {
if (ha >= 0x7ff00000) /* Inf or NaN */ if (ha >= 0x7ff00000) /* Inf or NaN */
{ {
u_int32_t low; uint32_t low;
w = a + b; /* for sNaN */ w = a + b; /* for sNaN */
if (issignaling (a) || issignaling (b)) if (issignaling (a) || issignaling (b))
return w; return w;
@ -95,7 +95,7 @@ __ieee754_hypot (double x, double y)
{ {
if (hb <= 0x000fffff) /* subnormal b or 0 */ if (hb <= 0x000fffff) /* subnormal b or 0 */
{ {
u_int32_t low; uint32_t low;
GET_LOW_WORD (low, b); GET_LOW_WORD (low, b);
if ((hb | low) == 0) if ((hb | low) == 0)
return a; return a;
@ -147,7 +147,7 @@ __ieee754_hypot (double x, double y)
} }
if (k != 0) if (k != 0)
{ {
u_int32_t high; uint32_t high;
t1 = 1.0; t1 = 1.0;
GET_HIGH_WORD (high, t1); GET_HIGH_WORD (high, t1);
SET_HIGH_WORD (t1, high + (k << 20)); SET_HIGH_WORD (t1, high + (k << 20));

View File

@ -61,7 +61,7 @@ __ieee754_jn (int n, double x)
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);
ix = 0x7fffffff & hx; ix = 0x7fffffff & hx;
/* if J(n,NaN) is NaN */ /* if J(n,NaN) is NaN */
if (__glibc_unlikely ((ix | ((u_int32_t) (lx | -lx)) >> 31) > 0x7ff00000)) if (__glibc_unlikely ((ix | ((uint32_t) (lx | -lx)) >> 31) > 0x7ff00000))
return x + x; return x + x;
if (n < 0) if (n < 0)
{ {
@ -266,7 +266,7 @@ __ieee754_yn (int n, double x)
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);
ix = 0x7fffffff & hx; ix = 0x7fffffff & hx;
/* if Y(n,NaN) is NaN */ /* if Y(n,NaN) is NaN */
if (__glibc_unlikely ((ix | ((u_int32_t) (lx | -lx)) >> 31) > 0x7ff00000)) if (__glibc_unlikely ((ix | ((uint32_t) (lx | -lx)) >> 31) > 0x7ff00000))
return x + x; return x + x;
if (__glibc_unlikely ((ix | lx) == 0)) if (__glibc_unlikely ((ix | lx) == 0))
return -HUGE_VAL + x; return -HUGE_VAL + x;
@ -318,7 +318,7 @@ __ieee754_yn (int n, double x)
} }
else else
{ {
u_int32_t high; uint32_t high;
a = __ieee754_y0 (x); a = __ieee754_y0 (x);
b = __ieee754_y1 (x); b = __ieee754_y1 (x);
/* quit if b is -inf */ /* quit if b is -inf */

View File

@ -57,7 +57,7 @@ __ieee754_log10 (double x)
{ {
double y, z; double y, z;
int32_t i, k, hx; int32_t i, k, hx;
u_int32_t lx; uint32_t lx;
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);
@ -75,7 +75,7 @@ __ieee754_log10 (double x)
if (__glibc_unlikely (hx >= 0x7ff00000)) if (__glibc_unlikely (hx >= 0x7ff00000))
return x + x; return x + x;
k += (hx >> 20) - 1023; k += (hx >> 20) - 1023;
i = ((u_int32_t) k & 0x80000000) >> 31; i = ((uint32_t) k & 0x80000000) >> 31;
hx = (hx & 0x000fffff) | ((0x3ff - i) << 20); hx = (hx & 0x000fffff) | ((0x3ff - i) << 20);
y = (double) (k + i); y = (double) (k + i);
if (FIX_INT_FP_CONVERT_ZERO && y == 0.0) if (FIX_INT_FP_CONVERT_ZERO && y == 0.0)

View File

@ -75,7 +75,7 @@ __ieee754_log2 (double x)
{ {
double hfsq, f, s, z, R, w, t1, t2, dk; double hfsq, f, s, z, R, w, t1, t2, dk;
int32_t k, hx, i, j; int32_t k, hx, i, j;
u_int32_t lx; uint32_t lx;
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);

View File

@ -74,7 +74,7 @@ __ieee754_rem_pio2 (double x, double *y)
double z, w, t, r, fn; double z, w, t, r, fn;
double tx[3]; double tx[3];
int32_t e0, i, j, nx, n, ix, hx; int32_t e0, i, j, nx, n, ix, hx;
u_int32_t low; uint32_t low;
GET_HIGH_WORD (hx, x); /* high word of x */ GET_HIGH_WORD (hx, x); /* high word of x */
ix = hx & 0x7fffffff; ix = hx & 0x7fffffff;
@ -130,7 +130,7 @@ __ieee754_rem_pio2 (double x, double *y)
} }
else else
{ {
u_int32_t high; uint32_t high;
j = ix >> 20; j = ix >> 20;
y[0] = r - w; y[0] = r - w;
GET_HIGH_WORD (high, y[0]); GET_HIGH_WORD (high, y[0]);

View File

@ -43,7 +43,7 @@ __ieee754_sinh (double x)
{ {
double t, w, h; double t, w, h;
int32_t ix, jx; int32_t ix, jx;
u_int32_t lx; uint32_t lx;
/* High word of |x|. */ /* High word of |x|. */
GET_HIGH_WORD (jx, x); GET_HIGH_WORD (jx, x);
@ -77,7 +77,7 @@ __ieee754_sinh (double x)
/* |x| in [log(maxdouble), overflowthresold] */ /* |x| in [log(maxdouble), overflowthresold] */
GET_LOW_WORD (lx, x); GET_LOW_WORD (lx, x);
if (ix < 0x408633ce || ((ix == 0x408633ce) && (lx <= (u_int32_t) 0x8fb9f87d))) if (ix < 0x408633ce || ((ix == 0x408633ce) && (lx <= (uint32_t) 0x8fb9f87d)))
{ {
w = __ieee754_exp (0.5 * fabs (x)); w = __ieee754_exp (0.5 * fabs (x));
t = h * w; t = h * w;

View File

@ -24,7 +24,7 @@ double
__ceil (double x) __ceil (double x)
{ {
int32_t i0, i1, j0; int32_t i0, i1, j0;
u_int32_t i, j; uint32_t i, j;
EXTRACT_WORDS (i0, i1, x); EXTRACT_WORDS (i0, i1, x);
j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
if (j0 < 20) if (j0 < 20)
@ -60,7 +60,7 @@ __ceil (double x)
} }
else else
{ {
i = ((u_int32_t) (0xffffffff)) >> (j0 - 20); i = ((uint32_t) (0xffffffff)) >> (j0 - 20);
if ((i1 & i) == 0) if ((i1 & i) == 0)
return x; /* x is integral */ return x; /* x is integral */
if (i0 > 0) if (i0 > 0)

View File

@ -26,7 +26,7 @@ static char rcsid[] = "$NetBSD: s_copysign.c,v 1.8 1995/05/10 20:46:57 jtc Exp $
double double
__copysign (double x, double y) __copysign (double x, double y)
{ {
u_int32_t hx, hy; uint32_t hx, hy;
GET_HIGH_WORD (hx, x); GET_HIGH_WORD (hx, x);
GET_HIGH_WORD (hy, y); GET_HIGH_WORD (hy, y);
SET_HIGH_WORD (x, (hx & 0x7fffffff) | (hy & 0x80000000)); SET_HIGH_WORD (x, (hx & 0x7fffffff) | (hy & 0x80000000));

View File

@ -201,7 +201,7 @@ __erf (double x)
ix = hx & 0x7fffffff; ix = hx & 0x7fffffff;
if (ix >= 0x7ff00000) /* erf(nan)=nan */ if (ix >= 0x7ff00000) /* erf(nan)=nan */
{ {
i = ((u_int32_t) hx >> 31) << 1; i = ((uint32_t) hx >> 31) << 1;
return (double) (1 - i) + one / x; /* erf(+-inf)=+-1 */ return (double) (1 - i) + one / x; /* erf(+-inf)=+-1 */
} }
@ -309,7 +309,7 @@ __erfc (double x)
ix = hx & 0x7fffffff; ix = hx & 0x7fffffff;
if (ix >= 0x7ff00000) /* erfc(nan)=nan */ if (ix >= 0x7ff00000) /* erfc(nan)=nan */
{ /* erfc(+-inf)=0,2 */ { /* erfc(+-inf)=0,2 */
double ret = (double) (((u_int32_t) hx >> 31) << 1) + one / x; double ret = (double) (((uint32_t) hx >> 31) << 1) + one / x;
if (FIX_INT_FP_CONVERT_ZERO && ret == 0.0) if (FIX_INT_FP_CONVERT_ZERO && ret == 0.0)
return 0.0; return 0.0;
return ret; return ret;

View File

@ -132,7 +132,7 @@ __expm1 (double x)
{ {
double y, hi, lo, c, t, e, hxs, hfx, r1, h2, h4, R1, R2, R3; double y, hi, lo, c, t, e, hxs, hfx, r1, h2, h4, R1, R2, R3;
int32_t k, xsb; int32_t k, xsb;
u_int32_t hx; uint32_t hx;
GET_HIGH_WORD (hx, x); GET_HIGH_WORD (hx, x);
xsb = hx & 0x80000000; /* sign bit of x */ xsb = hx & 0x80000000; /* sign bit of x */
@ -149,7 +149,7 @@ __expm1 (double x)
{ {
if (hx >= 0x7ff00000) if (hx >= 0x7ff00000)
{ {
u_int32_t low; uint32_t low;
GET_LOW_WORD (low, x); GET_LOW_WORD (low, x);
if (((hx & 0xfffff) | low) != 0) if (((hx & 0xfffff) | low) != 0)
return x + x; /* NaN */ return x + x; /* NaN */
@ -228,7 +228,7 @@ __expm1 (double x)
} }
if (k <= -2 || k > 56) /* suffice to return exp(x)-1 */ if (k <= -2 || k > 56) /* suffice to return exp(x)-1 */
{ {
u_int32_t high; uint32_t high;
y = one - (e - x); y = one - (e - x);
GET_HIGH_WORD (high, y); GET_HIGH_WORD (high, y);
SET_HIGH_WORD (y, high + (k << 20)); /* add k to y's exponent */ SET_HIGH_WORD (y, high + (k << 20)); /* add k to y's exponent */
@ -237,7 +237,7 @@ __expm1 (double x)
t = one; t = one;
if (k < 20) if (k < 20)
{ {
u_int32_t high; uint32_t high;
SET_HIGH_WORD (t, 0x3ff00000 - (0x200000 >> k)); /* t=1-2^-k */ SET_HIGH_WORD (t, 0x3ff00000 - (0x200000 >> k)); /* t=1-2^-k */
y = t - (e - x); y = t - (e - x);
GET_HIGH_WORD (high, y); GET_HIGH_WORD (high, y);
@ -245,7 +245,7 @@ __expm1 (double x)
} }
else else
{ {
u_int32_t high; uint32_t high;
SET_HIGH_WORD (t, ((0x3ff - k) << 20)); /* 2^-k */ SET_HIGH_WORD (t, ((0x3ff - k) << 20)); /* 2^-k */
y = x - (e + t); y = x - (e + t);
y += one; y += one;

View File

@ -33,7 +33,7 @@ int FINITE(double x)
{ {
int32_t hx; int32_t hx;
GET_HIGH_WORD (hx, x); GET_HIGH_WORD (hx, x);
return (int) ((u_int32_t) ((hx & 0x7ff00000) - 0x7ff00000) >> 31); return (int) ((uint32_t) ((hx & 0x7ff00000) - 0x7ff00000) >> 31);
} }
hidden_def (__finite) hidden_def (__finite)
weak_alias (__finite, finite) weak_alias (__finite, finite)

View File

@ -24,7 +24,7 @@ double
__floor (double x) __floor (double x)
{ {
int32_t i0, i1, j0; int32_t i0, i1, j0;
u_int32_t i, j; uint32_t i, j;
EXTRACT_WORDS (i0, i1, x); EXTRACT_WORDS (i0, i1, x);
j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
if (j0 < 20) if (j0 < 20)
@ -60,7 +60,7 @@ __floor (double x)
} }
else else
{ {
i = ((u_int32_t) (0xffffffff)) >> (j0 - 20); i = ((uint32_t) (0xffffffff)) >> (j0 - 20);
if ((i1 & i) == 0) if ((i1 & i) == 0)
return x; /* x is integral */ return x; /* x is integral */
if (i0 < 0) if (i0 < 0)

View File

@ -25,7 +25,7 @@
int int
__fpclassify (double x) __fpclassify (double x)
{ {
u_int32_t hx, lx; uint32_t hx, lx;
int retval = FP_NORMAL; int retval = FP_NORMAL;
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);

View File

@ -30,9 +30,9 @@ __isnan (double x)
int32_t hx, lx; int32_t hx, lx;
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);
hx &= 0x7fffffff; hx &= 0x7fffffff;
hx |= (u_int32_t) (lx | (-lx)) >> 31; hx |= (uint32_t) (lx | (-lx)) >> 31;
hx = 0x7ff00000 - hx; hx = 0x7ff00000 - hx;
return (int) (((u_int32_t) hx) >> 31); return (int) (((uint32_t) hx) >> 31);
} }
hidden_def (__isnan) hidden_def (__isnan)
weak_alias (__isnan, isnan) weak_alias (__isnan, isnan)

View File

@ -24,14 +24,14 @@ int
__issignaling (double x) __issignaling (double x)
{ {
#if HIGH_ORDER_BIT_IS_SET_FOR_SNAN #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
u_int32_t hxi; uint32_t hxi;
GET_HIGH_WORD (hxi, x); GET_HIGH_WORD (hxi, x);
/* We only have to care about the high-order bit of x's significand, because /* We only have to care about the high-order bit of x's significand, because
having it set (sNaN) already makes the significand different from that having it set (sNaN) already makes the significand different from that
used to designate infinity. */ used to designate infinity. */
return (hxi & 0x7ff80000) == 0x7ff80000; return (hxi & 0x7ff80000) == 0x7ff80000;
#else #else
u_int32_t hxi, lxi; uint32_t hxi, lxi;
EXTRACT_WORDS (hxi, lxi, x); EXTRACT_WORDS (hxi, lxi, x);
/* To keep the following comparison simple, toggle the quiet/signaling bit, /* To keep the following comparison simple, toggle the quiet/signaling bit,
so that it is set for sNaNs. This is inverse to IEEE 754-2008 (as well as so that it is set for sNaNs. This is inverse to IEEE 754-2008 (as well as

View File

@ -36,7 +36,7 @@ long long int
__llrint (double x) __llrint (double x)
{ {
int32_t j0; int32_t j0;
u_int32_t i1, i0; uint32_t i1, i0;
long long int result; long long int result;
double w; double w;
double t; double t;

View File

@ -29,7 +29,7 @@ long long int
__llround (double x) __llround (double x)
{ {
int32_t j0; int32_t j0;
u_int32_t i1, i0; uint32_t i1, i0;
long long int result; long long int result;
int sign; int sign;
@ -56,7 +56,7 @@ __llround (double x)
result = (((long long int) i0 << 32) | i1) << (j0 - 52); result = (((long long int) i0 << 32) | i1) << (j0 - 52);
else else
{ {
u_int32_t j = i1 + (0x80000000 >> (j0 - 20)); uint32_t j = i1 + (0x80000000 >> (j0 - 20));
if (j < i1) if (j < i1)
++i0; ++i0;

View File

@ -36,7 +36,7 @@ long int
__lrint (double x) __lrint (double x)
{ {
int32_t j0; int32_t j0;
u_int32_t i0, i1; uint32_t i0, i1;
double w; double w;
double t; double t;
long int result; long int result;

View File

@ -29,7 +29,7 @@ long int
__lround (double x) __lround (double x)
{ {
int32_t j0; int32_t j0;
u_int32_t i1, i0; uint32_t i1, i0;
long int result; long int result;
int sign; int sign;
@ -56,7 +56,7 @@ __lround (double x)
result = ((long int) i0 << (j0 - 20)) | ((long int) i1 << (j0 - 52)); result = ((long int) i0 << (j0 - 20)) | ((long int) i1 << (j0 - 52));
else else
{ {
u_int32_t j = i1 + (0x80000000 >> (j0 - 20)); uint32_t j = i1 + (0x80000000 >> (j0 - 20));
if (j < i1) if (j < i1)
++i0; ++i0;

View File

@ -28,7 +28,7 @@ double
__modf (double x, double *iptr) __modf (double x, double *iptr)
{ {
int32_t i0, i1, j0; int32_t i0, i1, j0;
u_int32_t i; uint32_t i;
EXTRACT_WORDS (i0, i1, x); EXTRACT_WORDS (i0, i1, x);
j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; /* exponent of x */ j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; /* exponent of x */
if (j0 < 20) /* integer part in high x */ if (j0 < 20) /* integer part in high x */
@ -65,7 +65,7 @@ __modf (double x, double *iptr)
} }
else /* fraction part in low x */ else /* fraction part in low x */
{ {
i = ((u_int32_t) (0xffffffff)) >> (j0 - 20); i = ((uint32_t) (0xffffffff)) >> (j0 - 20);
if ((i1 & i) == 0) /* x is integral */ if ((i1 & i) == 0) /* x is integral */
{ {
*iptr = x; *iptr = x;

View File

@ -24,7 +24,7 @@ double
__nextup (double x) __nextup (double x)
{ {
int32_t hx, ix; int32_t hx, ix;
u_int32_t lx; uint32_t lx;
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);
ix = hx & 0x7fffffff; ix = hx & 0x7fffffff;

View File

@ -29,7 +29,7 @@ double
__remquo (double x, double y, int *quo) __remquo (double x, double y, int *quo)
{ {
int32_t hx, hy; int32_t hx, hy;
u_int32_t sx, lx, ly; uint32_t sx, lx, ly;
int cquo, qs; int cquo, qs;
EXTRACT_WORDS (hx, lx, x); EXTRACT_WORDS (hx, lx, x);

View File

@ -26,7 +26,7 @@ double
__round (double x) __round (double x)
{ {
int32_t i0, j0; int32_t i0, j0;
u_int32_t i1; uint32_t i1;
EXTRACT_WORDS (i0, i1, x); EXTRACT_WORDS (i0, i1, x);
j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
@ -41,7 +41,7 @@ __round (double x)
} }
else else
{ {
u_int32_t i = 0x000fffff >> j0; uint32_t i = 0x000fffff >> j0;
if (((i0 & i) | i1) == 0) if (((i0 & i) | i1) == 0)
/* X is integral. */ /* X is integral. */
return x; return x;
@ -61,12 +61,12 @@ __round (double x)
} }
else else
{ {
u_int32_t i = 0xffffffff >> (j0 - 20); uint32_t i = 0xffffffff >> (j0 - 20);
if ((i1 & i) == 0) if ((i1 & i) == 0)
/* X is integral. */ /* X is integral. */
return x; return x;
u_int32_t j = i1 + (1 << (51 - j0)); uint32_t j = i1 + (1 << (51 - j0));
if (j < i1) if (j < i1)
i0 += 1; i0 += 1;
i1 = j; i1 = j;

View File

@ -26,7 +26,7 @@ double
__trunc (double x) __trunc (double x)
{ {
int32_t i0, j0; int32_t i0, j0;
u_int32_t i1; uint32_t i1;
int sx; int sx;
EXTRACT_WORDS (i0, i1, x); EXTRACT_WORDS (i0, i1, x);

View File

@ -23,7 +23,7 @@
int int
__issignaling (double x) __issignaling (double x)
{ {
u_int64_t xi; uint64_t xi;
EXTRACT_WORDS64 (xi, x); EXTRACT_WORDS64 (xi, x);
#if HIGH_ORDER_BIT_IS_SET_FOR_SNAN #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
/* We only have to care about the high-order bit of x's significand, because /* We only have to care about the high-order bit of x's significand, because

View File

@ -81,7 +81,7 @@ __ieee754_atan2f (float y, float x)
switch (m) { switch (m) {
case 0: return z ; /* atan(+,+) */ case 0: return z ; /* atan(+,+) */
case 1: { case 1: {
u_int32_t zh; uint32_t zh;
GET_FLOAT_WORD(zh,z); GET_FLOAT_WORD(zh,z);
SET_FLOAT_WORD(z,zh ^ 0x80000000); SET_FLOAT_WORD(z,zh ^ 0x80000000);
} }

View File

@ -41,7 +41,7 @@ __ieee754_fmodf (float x, float y)
return (x*y)/(x*y); return (x*y)/(x*y);
if(hx<hy) return x; /* |x|<|y| return x */ if(hx<hy) return x; /* |x|<|y| return x */
if(hx==hy) if(hx==hy)
return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/ return Zero[(uint32_t)sx>>31]; /* |x|=|y| return x*0*/
/* determine ix = ilogb(x) */ /* determine ix = ilogb(x) */
if(hx<0x00800000) { /* subnormal x */ if(hx<0x00800000) { /* subnormal x */
@ -74,7 +74,7 @@ __ieee754_fmodf (float x, float y)
if(hz<0){hx = hx+hx;} if(hz<0){hx = hx+hx;}
else { else {
if(hz==0) /* return sign(x)*0 */ if(hz==0) /* return sign(x)*0 */
return Zero[(u_int32_t)sx>>31]; return Zero[(uint32_t)sx>>31];
hx = hz+hz; hx = hz+hz;
} }
} }
@ -83,7 +83,7 @@ __ieee754_fmodf (float x, float y)
/* convert back to floating value and restore the sign */ /* convert back to floating value and restore the sign */
if(hx==0) /* return sign(x)*0 */ if(hx==0) /* return sign(x)*0 */
return Zero[(u_int32_t)sx>>31]; return Zero[(uint32_t)sx>>31];
while(hx<0x00800000) { /* normalize x */ while(hx<0x00800000) { /* normalize x */
hx = hx+hx; hx = hx+hx;
iy -= 1; iy -= 1;

View File

@ -118,7 +118,7 @@ __ieee754_gammaf_r (float x, int *signgamp)
return 1.0 / x; return 1.0 / x;
} }
if (__builtin_expect (hx < 0, 0) if (__builtin_expect (hx < 0, 0)
&& (u_int32_t) hx < 0xff800000 && __rintf (x) == x) && (uint32_t) hx < 0xff800000 && __rintf (x) == x)
{ {
/* Return value for integer x < 0 is NaN with invalid exception. */ /* Return value for integer x < 0 is NaN with invalid exception. */
*signgamp = 0; *signgamp = 0;

View File

@ -186,7 +186,7 @@ __ieee754_ynf(int n, float x)
float ret; float ret;
{ {
int32_t i,hx,ix; int32_t i,hx,ix;
u_int32_t ib; uint32_t ib;
int32_t sign; int32_t sign;
float a, b, temp; float a, b, temp;

View File

@ -42,7 +42,7 @@ __ieee754_log10f(float x)
} }
if (__builtin_expect(hx >= 0x7f800000, 0)) return x+x; if (__builtin_expect(hx >= 0x7f800000, 0)) return x+x;
k += (hx>>23)-127; k += (hx>>23)-127;
i = ((u_int32_t)k&0x80000000)>>31; i = ((uint32_t)k&0x80000000)>>31;
hx = (hx&0x007fffff)|((0x7f-i)<<23); hx = (hx&0x007fffff)|((0x7f-i)<<23);
y = (float)(k+i); y = (float)(k+i);
if (FIX_INT_FP_CONVERT_ZERO && y == 0.0f) if (FIX_INT_FP_CONVERT_ZERO && y == 0.0f)

View File

@ -134,7 +134,7 @@ __ieee754_powf(float x, float y)
} }
/* (x<0)**(non-int) is NaN */ /* (x<0)**(non-int) is NaN */
if(__builtin_expect(((((u_int32_t)hx>>31)-1)|yisint)==0, 0)) if(__builtin_expect(((((uint32_t)hx>>31)-1)|yisint)==0, 0))
return (x-x)/(x-x); return (x-x)/(x-x);
/* |y| is huge */ /* |y| is huge */
@ -177,7 +177,7 @@ __ieee754_powf(float x, float y)
} }
s = one; /* s (sign of result -ve**odd) = -1 else = 1 */ s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
if(((((u_int32_t)hx>>31)-1)|(yisint-1))==0) if(((((uint32_t)hx>>31)-1)|(yisint-1))==0)
s = -one; /* (-ve)**(odd int) */ s = -one; /* (-ve)**(odd int) */
/* compute y * d2 */ /* compute y * d2 */
@ -191,7 +191,7 @@ __ieee754_powf(float x, float y)
} }
else if (__builtin_expect((j&0x7fffffff)>0x43160000, 0))/* z <= -150 */ else if (__builtin_expect((j&0x7fffffff)>0x43160000, 0))/* z <= -150 */
return s*tiny*tiny; /* underflow */ return s*tiny*tiny; /* underflow */
else if (__builtin_expect((u_int32_t) j==0xc3160000, 0)){/* z == -150*/ else if (__builtin_expect((uint32_t) j==0xc3160000, 0)){/* z == -150*/
if(0.0<=(z-d1)) return s*tiny*tiny; /* underflow */ if(0.0<=(z-d1)) return s*tiny*tiny; /* underflow */
} }
/* /*

View File

@ -131,7 +131,7 @@ int32_t __ieee754_rem_pio2f(float x, float *y)
if(n<32&&(int32_t)(ix&0xffffff00)!=npio2_hw[n-1]) { if(n<32&&(int32_t)(ix&0xffffff00)!=npio2_hw[n-1]) {
y[0] = r-w; /* quick check no cancellation */ y[0] = r-w; /* quick check no cancellation */
} else { } else {
u_int32_t high; uint32_t high;
j = ix>>23; j = ix>>23;
y[0] = r-w; y[0] = r-w;
GET_FLOAT_WORD(high,y[0]); GET_FLOAT_WORD(high,y[0]);

View File

@ -23,7 +23,7 @@ float
__ieee754_remainderf(float x, float p) __ieee754_remainderf(float x, float p)
{ {
int32_t hx,hp; int32_t hx,hp;
u_int32_t sx; uint32_t sx;
float p_half; float p_half;
GET_FLOAT_WORD(hx,x); GET_FLOAT_WORD(hx,x);

View File

@ -24,7 +24,7 @@ __ieee754_sqrtf(float x)
float z; float z;
int32_t sign = (int)0x80000000; int32_t sign = (int)0x80000000;
int32_t ix,s,q,m,t,i; int32_t ix,s,q,m,t,i;
u_int32_t r; uint32_t r;
GET_FLOAT_WORD(ix,x); GET_FLOAT_WORD(ix,x);

View File

@ -21,7 +21,7 @@ float
__ceilf(float x) __ceilf(float x)
{ {
int32_t i0,j0; int32_t i0,j0;
u_int32_t i; uint32_t i;
GET_FLOAT_WORD(i0,x); GET_FLOAT_WORD(i0,x);
j0 = ((i0>>23)&0xff)-0x7f; j0 = ((i0>>23)&0xff)-0x7f;

View File

@ -28,7 +28,7 @@ static char rcsid[] = "$NetBSD: s_copysignf.c,v 1.4 1995/05/10 20:46:59 jtc Exp
float __copysignf(float x, float y) float __copysignf(float x, float y)
{ {
u_int32_t ix,iy; uint32_t ix,iy;
GET_FLOAT_WORD(ix,x); GET_FLOAT_WORD(ix,x);
GET_FLOAT_WORD(iy,y); GET_FLOAT_WORD(iy,y);
SET_FLOAT_WORD(x,(ix&0x7fffffff)|(iy&0x80000000)); SET_FLOAT_WORD(x,(ix&0x7fffffff)|(iy&0x80000000));

View File

@ -104,7 +104,7 @@ float __erff(float x)
GET_FLOAT_WORD(hx,x); GET_FLOAT_WORD(hx,x);
ix = hx&0x7fffffff; ix = hx&0x7fffffff;
if(ix>=0x7f800000) { /* erf(nan)=nan */ if(ix>=0x7f800000) { /* erf(nan)=nan */
i = ((u_int32_t)hx>>31)<<1; i = ((uint32_t)hx>>31)<<1;
return (float)(1-i)+one/x; /* erf(+-inf)=+-1 */ return (float)(1-i)+one/x; /* erf(+-inf)=+-1 */
} }
@ -162,7 +162,7 @@ float __erfcf(float x)
ix = hx&0x7fffffff; ix = hx&0x7fffffff;
if(ix>=0x7f800000) { /* erfc(nan)=nan */ if(ix>=0x7f800000) { /* erfc(nan)=nan */
/* erfc(+-inf)=0,2 */ /* erfc(+-inf)=0,2 */
float ret = (float)(((u_int32_t)hx>>31)<<1)+one/x; float ret = (float)(((uint32_t)hx>>31)<<1)+one/x;
if (FIX_INT_FP_CONVERT_ZERO && ret == 0.0f) if (FIX_INT_FP_CONVERT_ZERO && ret == 0.0f)
return 0.0f; return 0.0f;
return ret; return ret;

View File

@ -39,7 +39,7 @@ __expm1f(float x)
{ {
float y,hi,lo,c,t,e,hxs,hfx,r1; float y,hi,lo,c,t,e,hxs,hfx,r1;
int32_t k,xsb; int32_t k,xsb;
u_int32_t hx; uint32_t hx;
GET_FLOAT_WORD(hx,x); GET_FLOAT_WORD(hx,x);
xsb = hx&0x80000000; /* sign bit of x */ xsb = hx&0x80000000; /* sign bit of x */

View File

@ -35,7 +35,7 @@ int FINITEF(float x)
{ {
int32_t ix; int32_t ix;
GET_FLOAT_WORD(ix,x); GET_FLOAT_WORD(ix,x);
return (int)((u_int32_t)((ix&0x7f800000)-0x7f800000)>>31); return (int)((uint32_t)((ix&0x7f800000)-0x7f800000)>>31);
} }
hidden_def (__finitef) hidden_def (__finitef)
weak_alias (__finitef, finitef) weak_alias (__finitef, finitef)

View File

@ -27,7 +27,7 @@ float
__floorf(float x) __floorf(float x)
{ {
int32_t i0,j0; int32_t i0,j0;
u_int32_t i; uint32_t i;
GET_FLOAT_WORD(i0,x); GET_FLOAT_WORD(i0,x);
j0 = ((i0>>23)&0xff)-0x7f; j0 = ((i0>>23)&0xff)-0x7f;
if(j0<23) { if(j0<23) {

View File

@ -25,7 +25,7 @@
int int
__fpclassifyf (float x) __fpclassifyf (float x)
{ {
u_int32_t wx; uint32_t wx;
int retval = FP_NORMAL; int retval = FP_NORMAL;
GET_FLOAT_WORD (wx, x); GET_FLOAT_WORD (wx, x);

View File

@ -32,7 +32,7 @@ int __isnanf(float x)
GET_FLOAT_WORD(ix,x); GET_FLOAT_WORD(ix,x);
ix &= 0x7fffffff; ix &= 0x7fffffff;
ix = 0x7f800000 - ix; ix = 0x7f800000 - ix;
return (int)(((u_int32_t)(ix))>>31); return (int)(((uint32_t)(ix))>>31);
} }
hidden_def (__isnanf) hidden_def (__isnanf)
weak_alias (__isnanf, isnanf) weak_alias (__isnanf, isnanf)

View File

@ -23,7 +23,7 @@
int int
__issignalingf (float x) __issignalingf (float x)
{ {
u_int32_t xi; uint32_t xi;
GET_FLOAT_WORD (xi, x); GET_FLOAT_WORD (xi, x);
#if HIGH_ORDER_BIT_IS_SET_FOR_SNAN #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
/* We only have to care about the high-order bit of x's significand, because /* We only have to care about the high-order bit of x's significand, because

View File

@ -36,7 +36,7 @@ long long int
__llrintf (float x) __llrintf (float x)
{ {
int32_t j0; int32_t j0;
u_int32_t i0; uint32_t i0;
float w; float w;
float t; float t;
long long int result; long long int result;

View File

@ -29,7 +29,7 @@ long long int
__llroundf (float x) __llroundf (float x)
{ {
int32_t j0; int32_t j0;
u_int32_t i; uint32_t i;
long long int result; long long int result;
int sign; int sign;

View File

@ -36,7 +36,7 @@ long int
__lrintf (float x) __lrintf (float x)
{ {
int32_t j0; int32_t j0;
u_int32_t i0; uint32_t i0;
float w; float w;
float t; float t;
long int result; long int result;

View File

@ -29,7 +29,7 @@ long int
__lroundf (float x) __lroundf (float x)
{ {
int32_t j0; int32_t j0;
u_int32_t i; uint32_t i;
long int result; long int result;
int sign; int sign;

View File

@ -22,7 +22,7 @@ float
__modff(float x, float *iptr) __modff(float x, float *iptr)
{ {
int32_t i0,j0; int32_t i0,j0;
u_int32_t i; uint32_t i;
GET_FLOAT_WORD(i0,x); GET_FLOAT_WORD(i0,x);
j0 = ((i0>>23)&0xff)-0x7f; /* exponent of x */ j0 = ((i0>>23)&0xff)-0x7f; /* exponent of x */
if(__builtin_expect(j0<23, 1)) { /* integer part in x */ if(__builtin_expect(j0<23, 1)) { /* integer part in x */
@ -32,7 +32,7 @@ __modff(float x, float *iptr)
} else { } else {
i = (0x007fffff)>>j0; i = (0x007fffff)>>j0;
if((i0&i)==0) { /* x is integral */ if((i0&i)==0) { /* x is integral */
u_int32_t ix; uint32_t ix;
*iptr = x; *iptr = x;
GET_FLOAT_WORD(ix,x); GET_FLOAT_WORD(ix,x);
SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */ SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */

View File

@ -29,7 +29,7 @@ float
__remquof (float x, float y, int *quo) __remquof (float x, float y, int *quo)
{ {
int32_t hx,hy; int32_t hx,hy;
u_int32_t sx; uint32_t sx;
int cquo, qs; int cquo, qs;
GET_FLOAT_WORD (hx, x); GET_FLOAT_WORD (hx, x);

View File

@ -39,7 +39,7 @@ __roundf (float x)
} }
else else
{ {
u_int32_t i = 0x007fffff >> j0; uint32_t i = 0x007fffff >> j0;
if ((i0 & i) == 0) if ((i0 & i) == 0)
/* X is integral. */ /* X is integral. */
return x; return x;

View File

@ -38,7 +38,7 @@ _Float128
__ieee754_acoshl(_Float128 x) __ieee754_acoshl(_Float128 x)
{ {
_Float128 t; _Float128 t;
u_int64_t lx; uint64_t lx;
int64_t hx; int64_t hx;
GET_LDOUBLE_WORDS64(hx,lx,x); GET_LDOUBLE_WORDS64(hx,lx,x);
if(hx<0x3fff000000000000LL) { /* x < 1 */ if(hx<0x3fff000000000000LL) { /* x < 1 */

View File

@ -56,7 +56,7 @@ __ieee754_atan2l(_Float128 y, _Float128 x)
{ {
_Float128 z; _Float128 z;
int64_t k,m,hx,hy,ix,iy; int64_t k,m,hx,hy,ix,iy;
u_int64_t lx,ly; uint64_t lx,ly;
GET_LDOUBLE_WORDS64(hx,lx,x); GET_LDOUBLE_WORDS64(hx,lx,x);
ix = hx&0x7fffffffffffffffLL; ix = hx&0x7fffffffffffffffLL;
@ -109,7 +109,7 @@ __ieee754_atan2l(_Float128 y, _Float128 x)
switch (m) { switch (m) {
case 0: return z ; /* atan(+,+) */ case 0: return z ; /* atan(+,+) */
case 1: { case 1: {
u_int64_t zh; uint64_t zh;
GET_LDOUBLE_MSW64(zh,z); GET_LDOUBLE_MSW64(zh,z);
SET_LDOUBLE_MSW64(z,zh ^ 0x8000000000000000ULL); SET_LDOUBLE_MSW64(z,zh ^ 0x8000000000000000ULL);
} }

View File

@ -44,7 +44,7 @@ _Float128
__ieee754_atanhl(_Float128 x) __ieee754_atanhl(_Float128 x)
{ {
_Float128 t; _Float128 t;
u_int32_t jx, ix; uint32_t jx, ix;
ieee854_long_double_shape_type u; ieee854_long_double_shape_type u;
u.value = x; u.value = x;

View File

@ -27,7 +27,7 @@ _Float128
__ieee754_fmodl (_Float128 x, _Float128 y) __ieee754_fmodl (_Float128 x, _Float128 y)
{ {
int64_t n,hx,hy,hz,ix,iy,sx,i; int64_t n,hx,hy,hz,ix,iy,sx,i;
u_int64_t lx,ly,lz; uint64_t lx,ly,lz;
GET_LDOUBLE_WORDS64(hx,lx,x); GET_LDOUBLE_WORDS64(hx,lx,x);
GET_LDOUBLE_WORDS64(hy,ly,y); GET_LDOUBLE_WORDS64(hy,ly,y);
@ -42,7 +42,7 @@ __ieee754_fmodl (_Float128 x, _Float128 y)
if(hx<=hy) { if(hx<=hy) {
if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */ if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */
if(lx==ly) if(lx==ly)
return Zero[(u_int64_t)sx>>63]; /* |x|=|y| return x*0*/ return Zero[(uint64_t)sx>>63]; /* |x|=|y| return x*0*/
} }
/* determine ix = ilogb(x) */ /* determine ix = ilogb(x) */
@ -96,7 +96,7 @@ __ieee754_fmodl (_Float128 x, _Float128 y)
if(hz<0){hx = hx+hx+(lx>>63); lx = lx+lx;} if(hz<0){hx = hx+hx+(lx>>63); lx = lx+lx;}
else { else {
if((hz|lz)==0) /* return sign(x)*0 */ if((hz|lz)==0) /* return sign(x)*0 */
return Zero[(u_int64_t)sx>>63]; return Zero[(uint64_t)sx>>63];
hx = hz+hz+(lz>>63); lx = lz+lz; hx = hz+hz+(lz>>63); lx = lz+lz;
} }
} }
@ -105,7 +105,7 @@ __ieee754_fmodl (_Float128 x, _Float128 y)
/* convert back to floating value and restore the sign */ /* convert back to floating value and restore the sign */
if((hx|lx)==0) /* return sign(x)*0 */ if((hx|lx)==0) /* return sign(x)*0 */
return Zero[(u_int64_t)sx>>63]; return Zero[(uint64_t)sx>>63];
while(hx<0x0001000000000000LL) { /* normalize x */ while(hx<0x0001000000000000LL) { /* normalize x */
hx = hx+hx+(lx>>63); lx = lx+lx; hx = hx+hx+(lx>>63); lx = lx+lx;
iy -= 1; iy -= 1;
@ -116,7 +116,7 @@ __ieee754_fmodl (_Float128 x, _Float128 y)
} else { /* subnormal output */ } else { /* subnormal output */
n = -16382 - iy; n = -16382 - iy;
if(n<=48) { if(n<=48) {
lx = (lx>>n)|((u_int64_t)hx<<(64-n)); lx = (lx>>n)|((uint64_t)hx<<(64-n));
hx >>= n; hx >>= n;
} else if (n<=63) { } else if (n<=63) {
lx = (hx<<(64-n))|(lx>>n); hx = sx; lx = (hx<<(64-n))|(lx>>n); hx = sx;

View File

@ -123,7 +123,7 @@ _Float128
__ieee754_gammal_r (_Float128 x, int *signgamp) __ieee754_gammal_r (_Float128 x, int *signgamp)
{ {
int64_t hx; int64_t hx;
u_int64_t lx; uint64_t lx;
_Float128 ret; _Float128 ret;
GET_LDOUBLE_WORDS64 (hx, lx, x); GET_LDOUBLE_WORDS64 (hx, lx, x);
@ -134,7 +134,7 @@ __ieee754_gammal_r (_Float128 x, int *signgamp)
*signgamp = 0; *signgamp = 0;
return 1.0 / x; return 1.0 / x;
} }
if (hx < 0 && (u_int64_t) hx < 0xffff000000000000ULL && __rintl (x) == x) if (hx < 0 && (uint64_t) hx < 0xffff000000000000ULL && __rintl (x) == x)
{ {
/* Return value for integer x < 0 is NaN with invalid exception. */ /* Return value for integer x < 0 is NaN with invalid exception. */
*signgamp = 0; *signgamp = 0;

View File

@ -65,7 +65,7 @@ __ieee754_hypotl(_Float128 x, _Float128 y)
k=0; k=0;
if(ha > 0x5f3f000000000000LL) { /* a>2**8000 */ if(ha > 0x5f3f000000000000LL) { /* a>2**8000 */
if(ha >= 0x7fff000000000000LL) { /* Inf or NaN */ if(ha >= 0x7fff000000000000LL) { /* Inf or NaN */
u_int64_t low; uint64_t low;
w = a+b; /* for sNaN */ w = a+b; /* for sNaN */
if (issignaling (a) || issignaling (b)) if (issignaling (a) || issignaling (b))
return w; return w;
@ -83,7 +83,7 @@ __ieee754_hypotl(_Float128 x, _Float128 y)
} }
if(hb < 0x20bf000000000000LL) { /* b < 2**-8000 */ if(hb < 0x20bf000000000000LL) { /* b < 2**-8000 */
if(hb <= 0x0000ffffffffffffLL) { /* subnormal b or 0 */ if(hb <= 0x0000ffffffffffffLL) { /* subnormal b or 0 */
u_int64_t low; uint64_t low;
GET_LDOUBLE_LSW64(low,b); GET_LDOUBLE_LSW64(low,b);
if((hb|low)==0) return a; if((hb|low)==0) return a;
t1=0; t1=0;
@ -128,7 +128,7 @@ __ieee754_hypotl(_Float128 x, _Float128 y)
w = __ieee754_sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b))); w = __ieee754_sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b)));
} }
if(k!=0) { if(k!=0) {
u_int64_t high; uint64_t high;
t1 = 1; t1 = 1;
GET_LDOUBLE_MSW64(high,t1); GET_LDOUBLE_MSW64(high,t1);
SET_LDOUBLE_MSW64(t1,high+(k<<48)); SET_LDOUBLE_MSW64(t1,high+(k<<48));

View File

@ -71,7 +71,7 @@ static const _Float128
_Float128 _Float128
__ieee754_jnl (int n, _Float128 x) __ieee754_jnl (int n, _Float128 x)
{ {
u_int32_t se; uint32_t se;
int32_t i, ix, sgn; int32_t i, ix, sgn;
_Float128 a, b, temp, di, ret; _Float128 a, b, temp, di, ret;
_Float128 z, w; _Float128 z, w;
@ -309,7 +309,7 @@ strong_alias (__ieee754_jnl, __jnl_finite)
_Float128 _Float128
__ieee754_ynl (int n, _Float128 x) __ieee754_ynl (int n, _Float128 x)
{ {
u_int32_t se; uint32_t se;
int32_t i, ix; int32_t i, ix;
int32_t sign; int32_t sign;
_Float128 a, b, temp, ret; _Float128 a, b, temp, ret;

View File

@ -151,7 +151,7 @@ __ieee754_powl (_Float128 x, _Float128 y)
_Float128 y1, t1, t2, r, s, sgn, t, u, v, w; _Float128 y1, t1, t2, r, s, sgn, t, u, v, w;
_Float128 s2, s_h, s_l, t_h, t_l, ay; _Float128 s2, s_h, s_l, t_h, t_l, ay;
int32_t i, j, k, yisint, n; int32_t i, j, k, yisint, n;
u_int32_t ix, iy; uint32_t ix, iy;
int32_t hx, hy; int32_t hx, hy;
ieee854_long_double_shape_type o, p, q; ieee854_long_double_shape_type o, p, q;
@ -260,12 +260,12 @@ __ieee754_powl (_Float128 x, _Float128 y)
} }
/* (x<0)**(non-int) is NaN */ /* (x<0)**(non-int) is NaN */
if (((((u_int32_t) hx >> 31) - 1) | yisint) == 0) if (((((uint32_t) hx >> 31) - 1) | yisint) == 0)
return (x - x) / (x - x); return (x - x) / (x - x);
/* sgn (sign of result -ve**odd) = -1 else = 1 */ /* sgn (sign of result -ve**odd) = -1 else = 1 */
sgn = one; sgn = one;
if (((((u_int32_t) hx >> 31) - 1) | (yisint - 1)) == 0) if (((((uint32_t) hx >> 31) - 1) | (yisint - 1)) == 0)
sgn = -one; /* (-ve)**(odd int) */ sgn = -one; /* (-ve)**(odd int) */
/* |y| is huge. /* |y| is huge.

View File

@ -198,7 +198,7 @@ int32_t __ieee754_rem_pio2l(_Float128 x, _Float128 *y)
_Float128 z, w, t; _Float128 z, w, t;
double tx[8]; double tx[8];
int64_t exp, n, ix, hx; int64_t exp, n, ix, hx;
u_int64_t lx; uint64_t lx;
GET_LDOUBLE_WORDS64 (hx, lx, x); GET_LDOUBLE_WORDS64 (hx, lx, x);
ix = hx & 0x7fffffffffffffffLL; ix = hx & 0x7fffffffffffffffLL;

View File

@ -31,7 +31,7 @@ _Float128
__ieee754_remainderl(_Float128 x, _Float128 p) __ieee754_remainderl(_Float128 x, _Float128 p)
{ {
int64_t hx,hp; int64_t hx,hp;
u_int64_t sx,lx,lp; uint64_t sx,lx,lp;
_Float128 p_half; _Float128 p_half;
GET_LDOUBLE_WORDS64(hx,lx,x); GET_LDOUBLE_WORDS64(hx,lx,x);

View File

@ -64,7 +64,7 @@ _Float128
__ieee754_sinhl (_Float128 x) __ieee754_sinhl (_Float128 x)
{ {
_Float128 t, w, h; _Float128 t, w, h;
u_int32_t jx, ix; uint32_t jx, ix;
ieee854_long_double_shape_type u; ieee854_long_double_shape_type u;
/* Words of |x|. */ /* Words of |x|. */

View File

@ -81,9 +81,9 @@ __kernel_cosl(_Float128 x, _Float128 y)
{ {
_Float128 h, l, z, sin_l, cos_l_m1; _Float128 h, l, z, sin_l, cos_l_m1;
int64_t ix; int64_t ix;
u_int32_t tix, hix, index; uint32_t tix, hix, index;
GET_LDOUBLE_MSW64 (ix, x); GET_LDOUBLE_MSW64 (ix, x);
tix = ((u_int64_t)ix) >> 32; tix = ((uint64_t)ix) >> 32;
tix &= ~0x80000000; /* tix = |x|'s high 32 bits */ tix &= ~0x80000000; /* tix = |x|'s high 32 bits */
if (tix < 0x3ffc3000) /* |x| < 0.1484375 */ if (tix < 0x3ffc3000) /* |x| < 0.1484375 */
{ {
@ -118,7 +118,7 @@ __kernel_cosl(_Float128 x, _Float128 y)
case 2: index = (hix - 0x3ffc3000) >> 10; break; case 2: index = (hix - 0x3ffc3000) >> 10; break;
} }
SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0); SET_LDOUBLE_WORDS64(h, ((uint64_t)hix) << 32, 0);
l = y - (h - x); l = y - (h - x);
z = l * l; z = l * l;
sin_l = l*(ONE+z*(SSIN1+z*(SSIN2+z*(SSIN3+z*(SSIN4+z*SSIN5))))); sin_l = l*(ONE+z*(SSIN1+z*(SSIN2+z*(SSIN3+z*(SSIN4+z*SSIN5)))));

View File

@ -101,9 +101,9 @@ __kernel_sincosl(_Float128 x, _Float128 y, _Float128 *sinx, _Float128 *cosx, int
{ {
_Float128 h, l, z, sin_l, cos_l_m1; _Float128 h, l, z, sin_l, cos_l_m1;
int64_t ix; int64_t ix;
u_int32_t tix, hix, index; uint32_t tix, hix, index;
GET_LDOUBLE_MSW64 (ix, x); GET_LDOUBLE_MSW64 (ix, x);
tix = ((u_int64_t)ix) >> 32; tix = ((uint64_t)ix) >> 32;
tix &= ~0x80000000; /* tix = |x|'s high 32 bits */ tix &= ~0x80000000; /* tix = |x|'s high 32 bits */
if (tix < 0x3ffc3000) /* |x| < 0.1484375 */ if (tix < 0x3ffc3000) /* |x| < 0.1484375 */
{ {
@ -149,7 +149,7 @@ __kernel_sincosl(_Float128 x, _Float128 y, _Float128 *sinx, _Float128 *cosx, int
case 2: index = (hix - 0x3ffc3000) >> 10; break; case 2: index = (hix - 0x3ffc3000) >> 10; break;
} }
SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0); SET_LDOUBLE_WORDS64(h, ((uint64_t)hix) << 32, 0);
if (iy) if (iy)
l = y - (h - x); l = y - (h - x);
else else

View File

@ -82,9 +82,9 @@ __kernel_sinl(_Float128 x, _Float128 y, int iy)
{ {
_Float128 h, l, z, sin_l, cos_l_m1; _Float128 h, l, z, sin_l, cos_l_m1;
int64_t ix; int64_t ix;
u_int32_t tix, hix, index; uint32_t tix, hix, index;
GET_LDOUBLE_MSW64 (ix, x); GET_LDOUBLE_MSW64 (ix, x);
tix = ((u_int64_t)ix) >> 32; tix = ((uint64_t)ix) >> 32;
tix &= ~0x80000000; /* tix = |x|'s high 32 bits */ tix &= ~0x80000000; /* tix = |x|'s high 32 bits */
if (tix < 0x3ffc3000) /* |x| < 0.1484375 */ if (tix < 0x3ffc3000) /* |x| < 0.1484375 */
{ {
@ -118,7 +118,7 @@ __kernel_sinl(_Float128 x, _Float128 y, int iy)
case 2: index = (hix - 0x3ffc3000) >> 10; break; case 2: index = (hix - 0x3ffc3000) >> 10; break;
} }
SET_LDOUBLE_WORDS64(h, ((u_int64_t)hix) << 32, 0); SET_LDOUBLE_WORDS64(h, ((uint64_t)hix) << 32, 0);
if (iy) if (iy)
l = (ix < 0 ? -y : y) - (h - x); l = (ix < 0 ? -y : y) - (h - x);
else else

View File

@ -30,7 +30,7 @@ static char rcsid[] = "$NetBSD: $";
_Float128 __ceill(_Float128 x) _Float128 __ceill(_Float128 x)
{ {
int64_t i0,i1,j0; int64_t i0,i1,j0;
u_int64_t i,j; uint64_t i,j;
GET_LDOUBLE_WORDS64(i0,i1,x); GET_LDOUBLE_WORDS64(i0,i1,x);
j0 = ((i0>>48)&0x7fff)-0x3fff; j0 = ((i0>>48)&0x7fff)-0x3fff;
if(j0<48) { if(j0<48) {

View File

@ -28,7 +28,7 @@ static char rcsid[] = "$NetBSD: $";
_Float128 __copysignl(_Float128 x, _Float128 y) _Float128 __copysignl(_Float128 x, _Float128 y)
{ {
u_int64_t hx,hy; uint64_t hx,hy;
GET_LDOUBLE_MSW64(hx,x); GET_LDOUBLE_MSW64(hx,x);
GET_LDOUBLE_MSW64(hy,y); GET_LDOUBLE_MSW64(hy,y);
SET_LDOUBLE_MSW64(x,(hx&0x7fffffffffffffffULL) SET_LDOUBLE_MSW64(x,(hx&0x7fffffffffffffffULL)

View File

@ -819,7 +819,7 @@ __erfcl (_Float128 x)
if (ix >= 0x7fff0000) if (ix >= 0x7fff0000)
{ /* erfc(nan)=nan */ { /* erfc(nan)=nan */
/* erfc(+-inf)=0,2 */ /* erfc(+-inf)=0,2 */
return (_Float128) (((u_int32_t) sign >> 31) << 1) + one / x; return (_Float128) (((uint32_t) sign >> 31) << 1) + one / x;
} }
if (ix < 0x3ffd0000) /* |x| <1/4 */ if (ix < 0x3ffd0000) /* |x| <1/4 */

View File

@ -26,7 +26,7 @@ static char rcsid[] = "$NetBSD: $";
_Float128 __fabsl(_Float128 x) _Float128 __fabsl(_Float128 x)
{ {
u_int64_t hx; uint64_t hx;
GET_LDOUBLE_MSW64(hx,x); GET_LDOUBLE_MSW64(hx,x);
SET_LDOUBLE_MSW64(x,hx&0x7fffffffffffffffLL); SET_LDOUBLE_MSW64(x,hx&0x7fffffffffffffffLL);
return x; return x;

View File

@ -29,7 +29,7 @@ int __finitel(_Float128 x)
{ {
int64_t hx; int64_t hx;
GET_LDOUBLE_MSW64(hx,x); GET_LDOUBLE_MSW64(hx,x);
return (int)((u_int64_t)((hx&0x7fff000000000000LL) return (int)((uint64_t)((hx&0x7fff000000000000LL)
-0x7fff000000000000LL)>>63); -0x7fff000000000000LL)>>63);
} }
mathx_hidden_def (__finitel) mathx_hidden_def (__finitel)

View File

@ -30,7 +30,7 @@ static char rcsid[] = "$NetBSD: $";
_Float128 __floorl(_Float128 x) _Float128 __floorl(_Float128 x)
{ {
int64_t i0,i1,j0; int64_t i0,i1,j0;
u_int64_t i,j; uint64_t i,j;
GET_LDOUBLE_WORDS64(i0,i1,x); GET_LDOUBLE_WORDS64(i0,i1,x);
j0 = ((i0>>48)&0x7fff)-0x3fff; j0 = ((i0>>48)&0x7fff)-0x3fff;
if(j0<48) { if(j0<48) {

View File

@ -26,7 +26,7 @@
int int
__fpclassifyl (_Float128 x) __fpclassifyl (_Float128 x)
{ {
u_int64_t hx, lx; uint64_t hx, lx;
int retval = FP_NORMAL; int retval = FP_NORMAL;
GET_LDOUBLE_WORDS64 (hx, lx, x); GET_LDOUBLE_WORDS64 (hx, lx, x);

View File

@ -35,7 +35,7 @@ two114 = L(2.0769187434139310514121985316880384E+34); /* 0x4071000000000000, 0 *
_Float128 __frexpl(_Float128 x, int *eptr) _Float128 __frexpl(_Float128 x, int *eptr)
{ {
u_int64_t hx, lx, ix; uint64_t hx, lx, ix;
GET_LDOUBLE_WORDS64(hx,lx,x); GET_LDOUBLE_WORDS64(hx,lx,x);
ix = 0x7fffffffffffffffULL&hx; ix = 0x7fffffffffffffffULL&hx;
*eptr = 0; *eptr = 0;

View File

@ -30,9 +30,9 @@ int __isnanl(_Float128 x)
int64_t hx,lx; int64_t hx,lx;
GET_LDOUBLE_WORDS64(hx,lx,x); GET_LDOUBLE_WORDS64(hx,lx,x);
hx &= 0x7fffffffffffffffLL; hx &= 0x7fffffffffffffffLL;
hx |= (u_int64_t)(lx|(-lx))>>63; hx |= (uint64_t)(lx|(-lx))>>63;
hx = 0x7fff000000000000LL - hx; hx = 0x7fff000000000000LL - hx;
return (int)((u_int64_t)hx>>63); return (int)((uint64_t)hx>>63);
} }
mathx_hidden_def (__isnanl) mathx_hidden_def (__isnanl)
weak_alias (__isnanl, isnanl) weak_alias (__isnanl, isnanl)

View File

@ -23,7 +23,7 @@
int int
__issignalingl (_Float128 x) __issignalingl (_Float128 x)
{ {
u_int64_t hxi, lxi __attribute__ ((unused)); uint64_t hxi, lxi __attribute__ ((unused));
GET_LDOUBLE_WORDS64 (hxi, lxi, x); GET_LDOUBLE_WORDS64 (hxi, lxi, x);
#if HIGH_ORDER_BIT_IS_SET_FOR_SNAN #if HIGH_ORDER_BIT_IS_SET_FOR_SNAN
/* We only have to care about the high-order bit of x's significand, because /* We only have to care about the high-order bit of x's significand, because

View File

@ -36,7 +36,7 @@ long long int
__llrintl (_Float128 x) __llrintl (_Float128 x)
{ {
int32_t j0; int32_t j0;
u_int64_t i0,i1; uint64_t i0,i1;
_Float128 w; _Float128 w;
_Float128 t; _Float128 t;
long long int result; long long int result;

View File

@ -29,7 +29,7 @@ long long int
__llroundl (_Float128 x) __llroundl (_Float128 x)
{ {
int64_t j0; int64_t j0;
u_int64_t i1, i0; uint64_t i1, i0;
long long int result; long long int result;
int sign; int sign;
@ -55,7 +55,7 @@ __llroundl (_Float128 x)
result = ((long long int) i0 << (j0 - 48)) | (i1 << (j0 - 112)); result = ((long long int) i0 << (j0 - 48)) | (i1 << (j0 - 112));
else else
{ {
u_int64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48)); uint64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
if (j < i1) if (j < i1)
++i0; ++i0;

View File

@ -36,7 +36,7 @@ long int
__lrintl (_Float128 x) __lrintl (_Float128 x)
{ {
int32_t j0; int32_t j0;
u_int64_t i0,i1; uint64_t i0,i1;
_Float128 w; _Float128 w;
_Float128 t; _Float128 t;
long int result; long int result;

View File

@ -29,7 +29,7 @@ long int
__lroundl (_Float128 x) __lroundl (_Float128 x)
{ {
int64_t j0; int64_t j0;
u_int64_t i1, i0; uint64_t i1, i0;
long int result; long int result;
int sign; int sign;
@ -62,7 +62,7 @@ __lroundl (_Float128 x)
result = ((long int) i0 << (j0 - 48)) | (i1 << (j0 - 112)); result = ((long int) i0 << (j0 - 48)) | (i1 << (j0 - 112));
else else
{ {
u_int64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48)); uint64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
if (j < i1) if (j < i1)
++i0; ++i0;

View File

@ -35,7 +35,7 @@ static const _Float128 one = 1.0;
_Float128 __modfl(_Float128 x, _Float128 *iptr) _Float128 __modfl(_Float128 x, _Float128 *iptr)
{ {
int64_t i0,i1,j0; int64_t i0,i1,j0;
u_int64_t i; uint64_t i;
GET_LDOUBLE_WORDS64(i0,i1,x); GET_LDOUBLE_WORDS64(i0,i1,x);
j0 = ((i0>>48)&0x7fff)-0x3fff; /* exponent of x */ j0 = ((i0>>48)&0x7fff)-0x3fff; /* exponent of x */
if(j0<48) { /* integer part in high x */ if(j0<48) { /* integer part in high x */

View File

@ -37,10 +37,10 @@ _Float128 __nearbyintl(_Float128 x)
{ {
fenv_t env; fenv_t env;
int64_t i0,j0,sx; int64_t i0,j0,sx;
u_int64_t i1 __attribute__ ((unused)); uint64_t i1 __attribute__ ((unused));
_Float128 w,t; _Float128 w,t;
GET_LDOUBLE_WORDS64(i0,i1,x); GET_LDOUBLE_WORDS64(i0,i1,x);
sx = (((u_int64_t)i0)>>63); sx = (((uint64_t)i0)>>63);
j0 = ((i0>>48)&0x7fff)-0x3fff; j0 = ((i0>>48)&0x7fff)-0x3fff;
if(j0<112) { if(j0<112) {
if(j0<0) { if(j0<0) {

View File

@ -31,7 +31,7 @@ static char rcsid[] = "$NetBSD: $";
_Float128 __nextafterl(_Float128 x, _Float128 y) _Float128 __nextafterl(_Float128 x, _Float128 y)
{ {
int64_t hx,hy,ix,iy; int64_t hx,hy,ix,iy;
u_int64_t lx,ly; uint64_t lx,ly;
GET_LDOUBLE_WORDS64(hx,lx,x); GET_LDOUBLE_WORDS64(hx,lx,x);
GET_LDOUBLE_WORDS64(hy,ly,y); GET_LDOUBLE_WORDS64(hy,ly,y);

View File

@ -34,8 +34,8 @@ double __nexttoward(double x, long double y)
{ {
int32_t hx,ix; int32_t hx,ix;
int64_t hy,iy; int64_t hy,iy;
u_int32_t lx; uint32_t lx;
u_int64_t ly; uint64_t ly;
EXTRACT_WORDS(hx,lx,x); EXTRACT_WORDS(hx,lx,x);
GET_LDOUBLE_WORDS64(hy,ly,y); GET_LDOUBLE_WORDS64(hy,ly,y);
@ -49,7 +49,7 @@ double __nexttoward(double x, long double y)
if((long double) x==y) return y; /* x=y, return y */ if((long double) x==y) return y; /* x=y, return y */
if((ix|lx)==0) { /* x == 0 */ if((ix|lx)==0) { /* x == 0 */
double u; double u;
INSERT_WORDS(x,(u_int32_t)((hy>>32)&0x80000000),1);/* return +-minsub */ INSERT_WORDS(x,(uint32_t)((hy>>32)&0x80000000),1);/* return +-minsub */
u = math_opt_barrier (x); u = math_opt_barrier (x);
u = u * u; u = u * u;
math_force_eval (u); /* raise underflow flag */ math_force_eval (u); /* raise underflow flag */

View File

@ -26,7 +26,7 @@ float __nexttowardf(float x, long double y)
{ {
int32_t hx,ix; int32_t hx,ix;
int64_t hy,iy; int64_t hy,iy;
u_int64_t ly; uint64_t ly;
GET_FLOAT_WORD(hx,x); GET_FLOAT_WORD(hx,x);
GET_LDOUBLE_WORDS64(hy,ly,y); GET_LDOUBLE_WORDS64(hy,ly,y);
@ -40,7 +40,7 @@ float __nexttowardf(float x, long double y)
if((long double) x==y) return y; /* x=y, return y */ if((long double) x==y) return y; /* x=y, return y */
if(ix==0) { /* x == 0 */ if(ix==0) { /* x == 0 */
float u; float u;
SET_FLOAT_WORD(x,(u_int32_t)((hy>>32)&0x80000000)|1);/* return +-minsub*/ SET_FLOAT_WORD(x,(uint32_t)((hy>>32)&0x80000000)|1);/* return +-minsub*/
u = math_opt_barrier (x); u = math_opt_barrier (x);
u = u * u; u = u * u;
math_force_eval (u); /* raise underflow flag */ math_force_eval (u); /* raise underflow flag */

View File

@ -24,7 +24,7 @@ _Float128
__nextupl (_Float128 x) __nextupl (_Float128 x)
{ {
int64_t hx, ix; int64_t hx, ix;
u_int64_t lx; uint64_t lx;
GET_LDOUBLE_WORDS64 (hx, lx, x); GET_LDOUBLE_WORDS64 (hx, lx, x);
ix = hx & 0x7fffffffffffffffLL; ix = hx & 0x7fffffffffffffffLL;

View File

@ -30,7 +30,7 @@ _Float128
__remquol (_Float128 x, _Float128 y, int *quo) __remquol (_Float128 x, _Float128 y, int *quo)
{ {
int64_t hx,hy; int64_t hx,hy;
u_int64_t sx,lx,ly,qs; uint64_t sx,lx,ly,qs;
int cquo; int cquo;
GET_LDOUBLE_WORDS64 (hx, lx, x); GET_LDOUBLE_WORDS64 (hx, lx, x);

View File

@ -39,10 +39,10 @@ TWO112[2]={
_Float128 __rintl(_Float128 x) _Float128 __rintl(_Float128 x)
{ {
int64_t i0,j0,sx; int64_t i0,j0,sx;
u_int64_t i1 __attribute__ ((unused)); uint64_t i1 __attribute__ ((unused));
_Float128 w,t; _Float128 w,t;
GET_LDOUBLE_WORDS64(i0,i1,x); GET_LDOUBLE_WORDS64(i0,i1,x);
sx = (((u_int64_t)i0)>>63); sx = (((uint64_t)i0)>>63);
j0 = ((i0>>48)&0x7fff)-0x3fff; j0 = ((i0>>48)&0x7fff)-0x3fff;
if(j0<112) { if(j0<112) {
if(j0<0) { if(j0<0) {

View File

@ -27,7 +27,7 @@ _Float128
__roundl (_Float128 x) __roundl (_Float128 x)
{ {
int32_t j0; int32_t j0;
u_int64_t i1, i0; uint64_t i1, i0;
GET_LDOUBLE_WORDS64 (i0, i1, x); GET_LDOUBLE_WORDS64 (i0, i1, x);
j0 = ((i0 >> 48) & 0x7fff) - 0x3fff; j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
@ -42,7 +42,7 @@ __roundl (_Float128 x)
} }
else else
{ {
u_int64_t i = 0x0000ffffffffffffLL >> j0; uint64_t i = 0x0000ffffffffffffLL >> j0;
if (((i0 & i) | i1) == 0) if (((i0 & i) | i1) == 0)
/* X is integral. */ /* X is integral. */
return x; return x;
@ -62,12 +62,12 @@ __roundl (_Float128 x)
} }
else else
{ {
u_int64_t i = -1ULL >> (j0 - 48); uint64_t i = -1ULL >> (j0 - 48);
if ((i1 & i) == 0) if ((i1 & i) == 0)
/* X is integral. */ /* X is integral. */
return x; return x;
u_int64_t j = i1 + (1LL << (111 - j0)); uint64_t j = i1 + (1LL << (111 - j0));
if (j < i1) if (j < i1)
i0 += 1; i0 += 1;
i1 = j; i1 = j;

Some files were not shown because too many files have changed in this diff Show More