about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/Implies5
-rw-r--r--sysdeps/arm/Implies3
-rw-r--r--sysdeps/generic/e_atanhl.c14
-rw-r--r--sysdeps/generic/e_coshl.c14
-rw-r--r--sysdeps/generic/e_exp10.c (renamed from sysdeps/libm-ieee754/e_exp10.c)0
-rw-r--r--sysdeps/generic/e_exp10f.c (renamed from sysdeps/libm-ieee754/e_exp10f.c)0
-rw-r--r--sysdeps/generic/e_exp10l.c (renamed from sysdeps/libm-ieee754/e_exp10l.c)0
-rw-r--r--sysdeps/generic/e_gammal_r.c14
-rw-r--r--sysdeps/generic/e_hypotl.c14
-rw-r--r--sysdeps/generic/e_scalb.c (renamed from sysdeps/libm-ieee754/e_scalb.c)0
-rw-r--r--sysdeps/generic/e_scalbf.c (renamed from sysdeps/libm-ieee754/e_scalbf.c)0
-rw-r--r--sysdeps/generic/e_scalbl.c (renamed from sysdeps/libm-ieee754/e_scalbl.c)0
-rw-r--r--sysdeps/generic/e_sinhl.c14
-rw-r--r--sysdeps/generic/ldbl2mpn.c33
-rw-r--r--sysdeps/generic/math_ldbl.h5
-rw-r--r--sysdeps/generic/mpn2ldbl.c31
-rw-r--r--sysdeps/generic/printf_fphex.c64
-rw-r--r--sysdeps/generic/s_asinhl.c15
-rw-r--r--sysdeps/generic/s_cacos.c (renamed from sysdeps/libm-ieee754/s_cacos.c)0
-rw-r--r--sysdeps/generic/s_cacosf.c (renamed from sysdeps/libm-ieee754/s_cacosf.c)0
-rw-r--r--sysdeps/generic/s_cacosh.c (renamed from sysdeps/libm-ieee754/s_cacosh.c)0
-rw-r--r--sysdeps/generic/s_cacoshf.c (renamed from sysdeps/libm-ieee754/s_cacoshf.c)0
-rw-r--r--sysdeps/generic/s_cacoshl.c (renamed from sysdeps/libm-ieee754/s_cacoshl.c)0
-rw-r--r--sysdeps/generic/s_cacosl.c (renamed from sysdeps/libm-ieee754/s_cacosl.c)0
-rw-r--r--sysdeps/generic/s_casin.c (renamed from sysdeps/libm-ieee754/s_casin.c)0
-rw-r--r--sysdeps/generic/s_casinf.c (renamed from sysdeps/libm-ieee754/s_casinf.c)0
-rw-r--r--sysdeps/generic/s_casinh.c (renamed from sysdeps/libm-ieee754/s_casinh.c)0
-rw-r--r--sysdeps/generic/s_casinhf.c (renamed from sysdeps/libm-ieee754/s_casinhf.c)0
-rw-r--r--sysdeps/generic/s_casinhl.c (renamed from sysdeps/libm-ieee754/s_casinhl.c)0
-rw-r--r--sysdeps/generic/s_casinl.c (renamed from sysdeps/libm-ieee754/s_casinl.c)0
-rw-r--r--sysdeps/generic/s_catan.c (renamed from sysdeps/libm-ieee754/s_catan.c)0
-rw-r--r--sysdeps/generic/s_catanf.c (renamed from sysdeps/libm-ieee754/s_catanf.c)0
-rw-r--r--sysdeps/generic/s_catanh.c (renamed from sysdeps/libm-ieee754/s_catanh.c)0
-rw-r--r--sysdeps/generic/s_catanhf.c (renamed from sysdeps/libm-ieee754/s_catanhf.c)0
-rw-r--r--sysdeps/generic/s_catanhl.c (renamed from sysdeps/libm-ieee754/s_catanhl.c)0
-rw-r--r--sysdeps/generic/s_catanl.c (renamed from sysdeps/libm-ieee754/s_catanl.c)0
-rw-r--r--sysdeps/generic/s_cbrtl.c15
-rw-r--r--sysdeps/generic/s_ccos.c (renamed from sysdeps/libm-ieee754/s_ccos.c)0
-rw-r--r--sysdeps/generic/s_ccosf.c (renamed from sysdeps/libm-ieee754/s_ccosf.c)0
-rw-r--r--sysdeps/generic/s_ccosh.c (renamed from sysdeps/libm-ieee754/s_ccosh.c)0
-rw-r--r--sysdeps/generic/s_ccoshf.c (renamed from sysdeps/libm-ieee754/s_ccoshf.c)0
-rw-r--r--sysdeps/generic/s_ccoshl.c (renamed from sysdeps/libm-ieee754/s_ccoshl.c)0
-rw-r--r--sysdeps/generic/s_ccosl.c (renamed from sysdeps/libm-ieee754/s_ccosl.c)0
-rw-r--r--sysdeps/generic/s_cexp.c (renamed from sysdeps/libm-ieee754/s_cexp.c)0
-rw-r--r--sysdeps/generic/s_cexpf.c (renamed from sysdeps/libm-ieee754/s_cexpf.c)0
-rw-r--r--sysdeps/generic/s_cexpl.c (renamed from sysdeps/libm-ieee754/s_cexpl.c)0
-rw-r--r--sysdeps/generic/s_clog.c (renamed from sysdeps/libm-ieee754/s_clog.c)0
-rw-r--r--sysdeps/generic/s_clog10.c (renamed from sysdeps/libm-ieee754/s_clog10.c)0
-rw-r--r--sysdeps/generic/s_clog10f.c (renamed from sysdeps/libm-ieee754/s_clog10f.c)0
-rw-r--r--sysdeps/generic/s_clog10l.c (renamed from sysdeps/libm-ieee754/s_clog10l.c)0
-rw-r--r--sysdeps/generic/s_clogf.c (renamed from sysdeps/libm-ieee754/s_clogf.c)0
-rw-r--r--sysdeps/generic/s_clogl.c (renamed from sysdeps/libm-ieee754/s_clogl.c)0
-rw-r--r--sysdeps/generic/s_cpow.c (renamed from sysdeps/libm-ieee754/s_cpow.c)0
-rw-r--r--sysdeps/generic/s_cpowf.c (renamed from sysdeps/libm-ieee754/s_cpowf.c)0
-rw-r--r--sysdeps/generic/s_cpowl.c (renamed from sysdeps/libm-ieee754/s_cpowl.c)0
-rw-r--r--sysdeps/generic/s_cproj.c (renamed from sysdeps/libm-ieee754/s_cproj.c)0
-rw-r--r--sysdeps/generic/s_cprojf.c (renamed from sysdeps/libm-ieee754/s_cprojf.c)0
-rw-r--r--sysdeps/generic/s_cprojl.c (renamed from sysdeps/libm-ieee754/s_cprojl.c)0
-rw-r--r--sysdeps/generic/s_csin.c (renamed from sysdeps/libm-ieee754/s_csin.c)0
-rw-r--r--sysdeps/generic/s_csinf.c (renamed from sysdeps/libm-ieee754/s_csinf.c)0
-rw-r--r--sysdeps/generic/s_csinh.c (renamed from sysdeps/libm-ieee754/s_csinh.c)0
-rw-r--r--sysdeps/generic/s_csinhf.c (renamed from sysdeps/libm-ieee754/s_csinhf.c)0
-rw-r--r--sysdeps/generic/s_csinhl.c (renamed from sysdeps/libm-ieee754/s_csinhl.c)0
-rw-r--r--sysdeps/generic/s_csinl.c (renamed from sysdeps/libm-ieee754/s_csinl.c)0
-rw-r--r--sysdeps/generic/s_csqrt.c (renamed from sysdeps/libm-ieee754/s_csqrt.c)0
-rw-r--r--sysdeps/generic/s_csqrtf.c (renamed from sysdeps/libm-ieee754/s_csqrtf.c)0
-rw-r--r--sysdeps/generic/s_csqrtl.c (renamed from sysdeps/libm-ieee754/s_csqrtl.c)0
-rw-r--r--sysdeps/generic/s_ctan.c (renamed from sysdeps/libm-ieee754/s_ctan.c)0
-rw-r--r--sysdeps/generic/s_ctanf.c (renamed from sysdeps/libm-ieee754/s_ctanf.c)0
-rw-r--r--sysdeps/generic/s_ctanh.c (renamed from sysdeps/libm-ieee754/s_ctanh.c)0
-rw-r--r--sysdeps/generic/s_ctanhf.c (renamed from sysdeps/libm-ieee754/s_ctanhf.c)0
-rw-r--r--sysdeps/generic/s_ctanhl.c (renamed from sysdeps/libm-ieee754/s_ctanhl.c)0
-rw-r--r--sysdeps/generic/s_ctanl.c (renamed from sysdeps/libm-ieee754/s_ctanl.c)0
-rw-r--r--sysdeps/generic/s_fdim.c (renamed from sysdeps/libm-ieee754/s_fdim.c)0
-rw-r--r--sysdeps/generic/s_fdimf.c (renamed from sysdeps/libm-ieee754/s_fdimf.c)0
-rw-r--r--sysdeps/generic/s_fdiml.c (renamed from sysdeps/libm-ieee754/s_fdiml.c)0
-rw-r--r--sysdeps/generic/s_fma.c (renamed from sysdeps/libm-ieee754/s_fma.c)0
-rw-r--r--sysdeps/generic/s_fmaf.c (renamed from sysdeps/libm-ieee754/s_fmaf.c)0
-rw-r--r--sysdeps/generic/s_fmal.c (renamed from sysdeps/libm-ieee754/s_fmal.c)0
-rw-r--r--sysdeps/generic/s_fmax.c (renamed from sysdeps/libm-ieee754/s_fmax.c)0
-rw-r--r--sysdeps/generic/s_fmaxf.c (renamed from sysdeps/libm-ieee754/s_fmaxf.c)0
-rw-r--r--sysdeps/generic/s_fmaxl.c (renamed from sysdeps/libm-ieee754/s_fmaxl.c)0
-rw-r--r--sysdeps/generic/s_fmin.c (renamed from sysdeps/libm-ieee754/s_fmin.c)0
-rw-r--r--sysdeps/generic/s_fminf.c (renamed from sysdeps/libm-ieee754/s_fminf.c)0
-rw-r--r--sysdeps/generic/s_fminl.c (renamed from sysdeps/libm-ieee754/s_fminl.c)0
-rw-r--r--sysdeps/generic/s_ldexp.c (renamed from sysdeps/libm-ieee754/s_ldexp.c)0
-rw-r--r--sysdeps/generic/s_ldexpf.c (renamed from sysdeps/libm-ieee754/s_ldexpf.c)0
-rw-r--r--sysdeps/generic/s_ldexpl.c (renamed from sysdeps/libm-ieee754/s_ldexpl.c)0
-rw-r--r--sysdeps/generic/s_nan.c (renamed from sysdeps/libm-ieee754/s_nan.c)0
-rw-r--r--sysdeps/generic/s_nanf.c (renamed from sysdeps/libm-ieee754/s_nanf.c)0
-rw-r--r--sysdeps/generic/s_nanl.c (renamed from sysdeps/libm-ieee754/s_nanl.c)0
-rw-r--r--sysdeps/generic/s_nextafter.c (renamed from sysdeps/libm-ieee754/s_nextafter.c)2
-rw-r--r--sysdeps/generic/s_nexttowardf.c79
-rw-r--r--sysdeps/generic/s_nexttowardl.c (renamed from sysdeps/libm-ieee754/s_nexttowardl.c)0
-rw-r--r--sysdeps/generic/s_significand.c (renamed from sysdeps/libm-ieee754/s_significand.c)0
-rw-r--r--sysdeps/generic/s_significandf.c (renamed from sysdeps/libm-ieee754/s_significandf.c)0
-rw-r--r--sysdeps/generic/s_significandl.c (renamed from sysdeps/libm-ieee754/s_significandl.c)4
-rw-r--r--sysdeps/generic/s_tanhl.c15
-rw-r--r--sysdeps/generic/strtold.c42
-rw-r--r--sysdeps/generic/w_expl.c13
-rw-r--r--sysdeps/i386/Implies4
-rw-r--r--sysdeps/i386/fpu/Implies2
-rw-r--r--sysdeps/i386/fpu/e_acos.S (renamed from sysdeps/libm-i387/e_acos.S)0
-rw-r--r--sysdeps/i386/fpu/e_acosf.S (renamed from sysdeps/libm-i387/e_acosf.S)0
-rw-r--r--sysdeps/i386/fpu/e_acosh.S (renamed from sysdeps/libm-i387/e_acosh.S)0
-rw-r--r--sysdeps/i386/fpu/e_acoshf.S (renamed from sysdeps/libm-i387/e_acoshf.S)0
-rw-r--r--sysdeps/i386/fpu/e_acoshl.S (renamed from sysdeps/libm-i387/e_acoshl.S)0
-rw-r--r--sysdeps/i386/fpu/e_acosl.S (renamed from sysdeps/libm-i387/e_acosl.S)0
-rw-r--r--sysdeps/i386/fpu/e_asin.S (renamed from sysdeps/libm-i387/e_asin.S)0
-rw-r--r--sysdeps/i386/fpu/e_asinf.S (renamed from sysdeps/libm-i387/e_asinf.S)0
-rw-r--r--sysdeps/i386/fpu/e_asinl.S (renamed from sysdeps/libm-i387/e_asinl.S)0
-rw-r--r--sysdeps/i386/fpu/e_atan2.S (renamed from sysdeps/libm-i387/e_atan2.S)0
-rw-r--r--sysdeps/i386/fpu/e_atan2f.S (renamed from sysdeps/libm-i387/e_atan2f.S)0
-rw-r--r--sysdeps/i386/fpu/e_atan2l.S (renamed from sysdeps/libm-i387/e_atan2l.S)0
-rw-r--r--sysdeps/i386/fpu/e_atanh.S (renamed from sysdeps/libm-i387/e_atanh.S)0
-rw-r--r--sysdeps/i386/fpu/e_atanhf.S (renamed from sysdeps/libm-i387/e_atanhf.S)0
-rw-r--r--sysdeps/i386/fpu/e_atanhl.S (renamed from sysdeps/libm-i387/e_atanhl.S)0
-rw-r--r--sysdeps/i386/fpu/e_exp.S (renamed from sysdeps/libm-i387/e_exp.S)0
-rw-r--r--sysdeps/i386/fpu/e_exp10.S (renamed from sysdeps/libm-i387/e_exp10.S)0
-rw-r--r--sysdeps/i386/fpu/e_exp10f.S (renamed from sysdeps/libm-i387/e_exp10f.S)0
-rw-r--r--sysdeps/i386/fpu/e_exp10l.S (renamed from sysdeps/libm-i387/e_exp10l.S)0
-rw-r--r--sysdeps/i386/fpu/e_expf.S (renamed from sysdeps/libm-i387/e_expf.S)0
-rw-r--r--sysdeps/i386/fpu/e_expl.S (renamed from sysdeps/libm-i387/e_expl.S)0
-rw-r--r--sysdeps/i386/fpu/e_fmod.S (renamed from sysdeps/libm-i387/e_fmod.S)0
-rw-r--r--sysdeps/i386/fpu/e_fmodf.S (renamed from sysdeps/libm-i387/e_fmodf.S)0
-rw-r--r--sysdeps/i386/fpu/e_fmodl.S (renamed from sysdeps/libm-i387/e_fmodl.S)0
-rw-r--r--sysdeps/i386/fpu/e_hypot.S (renamed from sysdeps/libm-i387/e_hypot.S)0
-rw-r--r--sysdeps/i386/fpu/e_hypotf.S (renamed from sysdeps/libm-i387/e_hypotf.S)0
-rw-r--r--sysdeps/i386/fpu/e_log.S (renamed from sysdeps/libm-i387/e_log.S)0
-rw-r--r--sysdeps/i386/fpu/e_log10.S (renamed from sysdeps/libm-i387/e_log10.S)0
-rw-r--r--sysdeps/i386/fpu/e_log10f.S (renamed from sysdeps/libm-i387/e_log10f.S)0
-rw-r--r--sysdeps/i386/fpu/e_log10l.S (renamed from sysdeps/libm-i387/e_log10l.S)0
-rw-r--r--sysdeps/i386/fpu/e_logf.S (renamed from sysdeps/libm-i387/e_logf.S)0
-rw-r--r--sysdeps/i386/fpu/e_logl.S (renamed from sysdeps/libm-i387/e_logl.S)0
-rw-r--r--sysdeps/i386/fpu/e_pow.S (renamed from sysdeps/libm-i387/e_pow.S)0
-rw-r--r--sysdeps/i386/fpu/e_powf.S (renamed from sysdeps/libm-i387/e_powf.S)0
-rw-r--r--sysdeps/i386/fpu/e_powl.S (renamed from sysdeps/libm-i387/e_powl.S)0
-rw-r--r--sysdeps/i386/fpu/e_rem_pio2.c (renamed from sysdeps/libm-i387/e_rem_pio2.c)0
-rw-r--r--sysdeps/i386/fpu/e_rem_pio2f.c (renamed from sysdeps/libm-i387/e_rem_pio2f.c)0
-rw-r--r--sysdeps/i386/fpu/e_rem_pio2l.c (renamed from sysdeps/libm-i387/e_rem_pio2l.c)0
-rw-r--r--sysdeps/i386/fpu/e_remainder.S (renamed from sysdeps/libm-i387/e_remainder.S)0
-rw-r--r--sysdeps/i386/fpu/e_remainderf.S (renamed from sysdeps/libm-i387/e_remainderf.S)0
-rw-r--r--sysdeps/i386/fpu/e_remainderl.S (renamed from sysdeps/libm-i387/e_remainderl.S)0
-rw-r--r--sysdeps/i386/fpu/e_scalb.S (renamed from sysdeps/libm-i387/e_scalb.S)0
-rw-r--r--sysdeps/i386/fpu/e_scalbf.S (renamed from sysdeps/libm-i387/e_scalbf.S)0
-rw-r--r--sysdeps/i386/fpu/e_scalbl.S (renamed from sysdeps/libm-i387/e_scalbl.S)0
-rw-r--r--sysdeps/i386/fpu/e_sqrt.S (renamed from sysdeps/libm-i387/e_sqrt.S)0
-rw-r--r--sysdeps/i386/fpu/e_sqrtf.S (renamed from sysdeps/libm-i387/e_sqrtf.S)0
-rw-r--r--sysdeps/i386/fpu/e_sqrtl.S (renamed from sysdeps/libm-i387/e_sqrtl.S)0
-rw-r--r--sysdeps/i386/fpu/k_rem_pio2.c (renamed from sysdeps/libm-i387/k_rem_pio2.c)0
-rw-r--r--sysdeps/i386/fpu/k_rem_pio2f.c (renamed from sysdeps/libm-i387/k_rem_pio2f.c)0
-rw-r--r--sysdeps/i386/fpu/k_rem_pio2l.c (renamed from sysdeps/libm-i387/k_rem_pio2l.c)0
-rw-r--r--sysdeps/i386/fpu/s_asinh.S (renamed from sysdeps/libm-i387/s_asinh.S)0
-rw-r--r--sysdeps/i386/fpu/s_asinhf.S (renamed from sysdeps/libm-i387/s_asinhf.S)0
-rw-r--r--sysdeps/i386/fpu/s_asinhl.S (renamed from sysdeps/libm-i387/s_asinhl.S)0
-rw-r--r--sysdeps/i386/fpu/s_atan.S (renamed from sysdeps/libm-i387/s_atan.S)0
-rw-r--r--sysdeps/i386/fpu/s_atanf.S (renamed from sysdeps/libm-i387/s_atanf.S)0
-rw-r--r--sysdeps/i386/fpu/s_atanl.S (renamed from sysdeps/libm-i387/s_atanl.S)0
-rw-r--r--sysdeps/i386/fpu/s_cbrt.S (renamed from sysdeps/libm-i387/s_cbrt.S)0
-rw-r--r--sysdeps/i386/fpu/s_cbrtf.S (renamed from sysdeps/libm-i387/s_cbrtf.S)0
-rw-r--r--sysdeps/i386/fpu/s_cbrtl.S (renamed from sysdeps/libm-i387/s_cbrtl.S)0
-rw-r--r--sysdeps/i386/fpu/s_ceil.S (renamed from sysdeps/libm-i387/s_ceil.S)0
-rw-r--r--sysdeps/i386/fpu/s_ceilf.S (renamed from sysdeps/libm-i387/s_ceilf.S)0
-rw-r--r--sysdeps/i386/fpu/s_ceill.S (renamed from sysdeps/libm-i387/s_ceill.S)0
-rw-r--r--sysdeps/i386/fpu/s_cexp.S (renamed from sysdeps/libm-i387/s_cexp.S)0
-rw-r--r--sysdeps/i386/fpu/s_cexpf.S (renamed from sysdeps/libm-i387/s_cexpf.S)0
-rw-r--r--sysdeps/i386/fpu/s_cexpl.S (renamed from sysdeps/libm-i387/s_cexpl.S)0
-rw-r--r--sysdeps/i386/fpu/s_copysign.S (renamed from sysdeps/libm-i387/s_copysign.S)0
-rw-r--r--sysdeps/i386/fpu/s_copysignf.S (renamed from sysdeps/libm-i387/s_copysignf.S)0
-rw-r--r--sysdeps/i386/fpu/s_copysignl.S (renamed from sysdeps/libm-i387/s_copysignl.S)0
-rw-r--r--sysdeps/i386/fpu/s_cos.S (renamed from sysdeps/libm-i387/s_cos.S)0
-rw-r--r--sysdeps/i386/fpu/s_cosf.S (renamed from sysdeps/libm-i387/s_cosf.S)0
-rw-r--r--sysdeps/i386/fpu/s_cosl.S (renamed from sysdeps/libm-i387/s_cosl.S)0
-rw-r--r--sysdeps/i386/fpu/s_exp2.S (renamed from sysdeps/libm-i387/s_exp2.S)0
-rw-r--r--sysdeps/i386/fpu/s_exp2f.S (renamed from sysdeps/libm-i387/s_exp2f.S)0
-rw-r--r--sysdeps/i386/fpu/s_exp2l.S (renamed from sysdeps/libm-i387/s_exp2l.S)0
-rw-r--r--sysdeps/i386/fpu/s_expm1.S (renamed from sysdeps/libm-i387/s_expm1.S)0
-rw-r--r--sysdeps/i386/fpu/s_expm1f.S (renamed from sysdeps/libm-i387/s_expm1f.S)0
-rw-r--r--sysdeps/i386/fpu/s_expm1l.S (renamed from sysdeps/libm-i387/s_expm1l.S)0
-rw-r--r--sysdeps/i386/fpu/s_fdim.S (renamed from sysdeps/libm-i387/s_fdim.S)0
-rw-r--r--sysdeps/i386/fpu/s_fdimf.S (renamed from sysdeps/libm-i387/s_fdimf.S)0
-rw-r--r--sysdeps/i386/fpu/s_fdiml.S (renamed from sysdeps/libm-i387/s_fdiml.S)0
-rw-r--r--sysdeps/i386/fpu/s_finite.S (renamed from sysdeps/libm-i387/s_finite.S)0
-rw-r--r--sysdeps/i386/fpu/s_finitef.S (renamed from sysdeps/libm-i387/s_finitef.S)0
-rw-r--r--sysdeps/i386/fpu/s_finitel.S (renamed from sysdeps/libm-i387/s_finitel.S)0
-rw-r--r--sysdeps/i386/fpu/s_floor.S (renamed from sysdeps/libm-i387/s_floor.S)0
-rw-r--r--sysdeps/i386/fpu/s_floorf.S (renamed from sysdeps/libm-i387/s_floorf.S)0
-rw-r--r--sysdeps/i386/fpu/s_floorl.S (renamed from sysdeps/libm-i387/s_floorl.S)0
-rw-r--r--sysdeps/i386/fpu/s_fma.S (renamed from sysdeps/libm-i387/s_fma.S)0
-rw-r--r--sysdeps/i386/fpu/s_fmaf.S (renamed from sysdeps/libm-i387/s_fmaf.S)0
-rw-r--r--sysdeps/i386/fpu/s_fmal.S (renamed from sysdeps/libm-i387/s_fmal.S)0
-rw-r--r--sysdeps/i386/fpu/s_fmax.S (renamed from sysdeps/libm-i387/s_fmax.S)0
-rw-r--r--sysdeps/i386/fpu/s_fmaxf.S (renamed from sysdeps/libm-i387/s_fmaxf.S)0
-rw-r--r--sysdeps/i386/fpu/s_fmaxl.S (renamed from sysdeps/libm-i387/s_fmaxl.S)0
-rw-r--r--sysdeps/i386/fpu/s_fmin.S (renamed from sysdeps/libm-i387/s_fmin.S)0
-rw-r--r--sysdeps/i386/fpu/s_fminf.S (renamed from sysdeps/libm-i387/s_fminf.S)0
-rw-r--r--sysdeps/i386/fpu/s_fminl.S (renamed from sysdeps/libm-i387/s_fminl.S)0
-rw-r--r--sysdeps/i386/fpu/s_frexp.S (renamed from sysdeps/libm-i387/s_frexp.S)0
-rw-r--r--sysdeps/i386/fpu/s_frexpf.S (renamed from sysdeps/libm-i387/s_frexpf.S)0
-rw-r--r--sysdeps/i386/fpu/s_frexpl.S (renamed from sysdeps/libm-i387/s_frexpl.S)0
-rw-r--r--sysdeps/i386/fpu/s_ilogb.S (renamed from sysdeps/libm-i387/s_ilogb.S)0
-rw-r--r--sysdeps/i386/fpu/s_ilogbf.S (renamed from sysdeps/libm-i387/s_ilogbf.S)0
-rw-r--r--sysdeps/i386/fpu/s_ilogbl.S (renamed from sysdeps/libm-i387/s_ilogbl.S)0
-rw-r--r--sysdeps/i386/fpu/s_isinfl.c (renamed from sysdeps/libm-i387/s_isinfl.c)0
-rw-r--r--sysdeps/i386/fpu/s_isnanl.c (renamed from sysdeps/libm-i387/s_isnanl.c)0
-rw-r--r--sysdeps/i386/fpu/s_llrint.S (renamed from sysdeps/libm-i387/s_llrint.S)0
-rw-r--r--sysdeps/i386/fpu/s_llrintf.S (renamed from sysdeps/libm-i387/s_llrintf.S)0
-rw-r--r--sysdeps/i386/fpu/s_llrintl.S (renamed from sysdeps/libm-i387/s_llrintl.S)0
-rw-r--r--sysdeps/i386/fpu/s_log1p.S (renamed from sysdeps/libm-i387/s_log1p.S)0
-rw-r--r--sysdeps/i386/fpu/s_log1pf.S (renamed from sysdeps/libm-i387/s_log1pf.S)0
-rw-r--r--sysdeps/i386/fpu/s_log1pl.S (renamed from sysdeps/libm-i387/s_log1pl.S)0
-rw-r--r--sysdeps/i386/fpu/s_log2.S (renamed from sysdeps/libm-i387/s_log2.S)0
-rw-r--r--sysdeps/i386/fpu/s_log2f.S (renamed from sysdeps/libm-i387/s_log2f.S)0
-rw-r--r--sysdeps/i386/fpu/s_log2l.S (renamed from sysdeps/libm-i387/s_log2l.S)0
-rw-r--r--sysdeps/i386/fpu/s_logb.S (renamed from sysdeps/libm-i387/s_logb.S)0
-rw-r--r--sysdeps/i386/fpu/s_logbf.S (renamed from sysdeps/libm-i387/s_logbf.S)0
-rw-r--r--sysdeps/i386/fpu/s_logbl.S (renamed from sysdeps/libm-i387/s_logbl.S)0
-rw-r--r--sysdeps/i386/fpu/s_lrint.S (renamed from sysdeps/libm-i387/s_lrint.S)0
-rw-r--r--sysdeps/i386/fpu/s_lrintf.S (renamed from sysdeps/libm-i387/s_lrintf.S)0
-rw-r--r--sysdeps/i386/fpu/s_lrintl.S (renamed from sysdeps/libm-i387/s_lrintl.S)0
-rw-r--r--sysdeps/i386/fpu/s_nearbyint.S (renamed from sysdeps/libm-i387/s_nearbyint.S)0
-rw-r--r--sysdeps/i386/fpu/s_nearbyintf.S (renamed from sysdeps/libm-i387/s_nearbyintf.S)0
-rw-r--r--sysdeps/i386/fpu/s_nearbyintl.S (renamed from sysdeps/libm-i387/s_nearbyintl.S)0
-rw-r--r--sysdeps/i386/fpu/s_nextafterl.c (renamed from sysdeps/libm-i387/s_nextafterl.c)0
-rw-r--r--sysdeps/i386/fpu/s_remquo.S (renamed from sysdeps/libm-i387/s_remquo.S)0
-rw-r--r--sysdeps/i386/fpu/s_remquof.S (renamed from sysdeps/libm-i387/s_remquof.S)0
-rw-r--r--sysdeps/i386/fpu/s_remquol.S (renamed from sysdeps/libm-i387/s_remquol.S)0
-rw-r--r--sysdeps/i386/fpu/s_rint.S (renamed from sysdeps/libm-i387/s_rint.S)0
-rw-r--r--sysdeps/i386/fpu/s_rintf.S (renamed from sysdeps/libm-i387/s_rintf.S)0
-rw-r--r--sysdeps/i386/fpu/s_rintl.S (renamed from sysdeps/libm-i387/s_rintl.S)0
-rw-r--r--sysdeps/i386/fpu/s_scalbln.c (renamed from sysdeps/libm-i387/s_scalbln.c)0
-rw-r--r--sysdeps/i386/fpu/s_scalblnf.c (renamed from sysdeps/libm-i387/s_scalblnf.c)0
-rw-r--r--sysdeps/i386/fpu/s_scalblnl.c (renamed from sysdeps/libm-i387/s_scalblnl.c)0
-rw-r--r--sysdeps/i386/fpu/s_scalbn.S (renamed from sysdeps/libm-i387/s_scalbn.S)0
-rw-r--r--sysdeps/i386/fpu/s_scalbnf.S (renamed from sysdeps/libm-i387/s_scalbnf.S)0
-rw-r--r--sysdeps/i386/fpu/s_scalbnl.S (renamed from sysdeps/libm-i387/s_scalbnl.S)0
-rw-r--r--sysdeps/i386/fpu/s_significand.S (renamed from sysdeps/libm-i387/s_significand.S)0
-rw-r--r--sysdeps/i386/fpu/s_significandf.S (renamed from sysdeps/libm-i387/s_significandf.S)0
-rw-r--r--sysdeps/i386/fpu/s_significandl.S (renamed from sysdeps/libm-i387/s_significandl.S)0
-rw-r--r--sysdeps/i386/fpu/s_sin.S (renamed from sysdeps/libm-i387/s_sin.S)0
-rw-r--r--sysdeps/i386/fpu/s_sincos.S (renamed from sysdeps/libm-i387/s_sincos.S)0
-rw-r--r--sysdeps/i386/fpu/s_sincosf.S (renamed from sysdeps/libm-i387/s_sincosf.S)0
-rw-r--r--sysdeps/i386/fpu/s_sincosl.S (renamed from sysdeps/libm-i387/s_sincosl.S)0
-rw-r--r--sysdeps/i386/fpu/s_sinf.S (renamed from sysdeps/libm-i387/s_sinf.S)0
-rw-r--r--sysdeps/i386/fpu/s_sinl.S (renamed from sysdeps/libm-i387/s_sinl.S)0
-rw-r--r--sysdeps/i386/fpu/s_tan.S (renamed from sysdeps/libm-i387/s_tan.S)0
-rw-r--r--sysdeps/i386/fpu/s_tanf.S (renamed from sysdeps/libm-i387/s_tanf.S)0
-rw-r--r--sysdeps/i386/fpu/s_tanl.S (renamed from sysdeps/libm-i387/s_tanl.S)0
-rw-r--r--sysdeps/i386/fpu/s_trunc.S (renamed from sysdeps/libm-i387/s_trunc.S)0
-rw-r--r--sysdeps/i386/fpu/s_truncf.S (renamed from sysdeps/libm-i387/s_truncf.S)0
-rw-r--r--sysdeps/i386/fpu/s_truncl.S (renamed from sysdeps/libm-i387/s_truncl.S)0
-rw-r--r--sysdeps/i386/fpu/t_exp.c (renamed from sysdeps/libm-i387/t_exp.c)0
-rw-r--r--sysdeps/i386/i686/Implies1
-rw-r--r--sysdeps/i386/i686/fpu/s_fdim.S (renamed from sysdeps/libm-i387/i686/s_fdim.S)0
-rw-r--r--sysdeps/i386/i686/fpu/s_fdimf.S (renamed from sysdeps/libm-i387/i686/s_fdimf.S)0
-rw-r--r--sysdeps/i386/i686/fpu/s_fdiml.S (renamed from sysdeps/libm-i387/i686/s_fdiml.S)0
-rw-r--r--sysdeps/i386/i686/fpu/s_fmax.S (renamed from sysdeps/libm-i387/i686/s_fmax.S)0
-rw-r--r--sysdeps/i386/i686/fpu/s_fmaxf.S (renamed from sysdeps/libm-i387/i686/s_fmaxf.S)0
-rw-r--r--sysdeps/i386/i686/fpu/s_fmaxl.S (renamed from sysdeps/libm-i387/i686/s_fmaxl.S)0
-rw-r--r--sysdeps/i386/i686/fpu/s_fmin.S (renamed from sysdeps/libm-i387/i686/s_fmin.S)0
-rw-r--r--sysdeps/i386/i686/fpu/s_fminf.S (renamed from sysdeps/libm-i387/i686/s_fminf.S)0
-rw-r--r--sysdeps/i386/i686/fpu/s_fminl.S (renamed from sysdeps/libm-i387/i686/s_fminl.S)0
-rw-r--r--sysdeps/i960/Implies3
-rw-r--r--sysdeps/ieee754/Implies2
-rw-r--r--sysdeps/ieee754/dbl-64/Dist1
-rw-r--r--sysdeps/ieee754/dbl-64/dbl2mpn.c (renamed from sysdeps/ieee754/dbl2mpn.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_acos.c (renamed from sysdeps/libm-ieee754/e_acos.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_acosh.c (renamed from sysdeps/libm-ieee754/e_acosh.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_asin.c (renamed from sysdeps/libm-ieee754/e_asin.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_atan2.c (renamed from sysdeps/libm-ieee754/e_atan2.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_atanh.c (renamed from sysdeps/libm-ieee754/e_atanh.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_cosh.c (renamed from sysdeps/libm-ieee754/e_cosh.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_exp.c (renamed from sysdeps/libm-ieee754/e_exp.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_fmod.c (renamed from sysdeps/libm-ieee754/e_fmod.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_gamma_r.c (renamed from sysdeps/libm-ieee754/e_gamma_r.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_hypot.c (renamed from sysdeps/libm-ieee754/e_hypot.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_j0.c (renamed from sysdeps/libm-ieee754/e_j0.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_j1.c (renamed from sysdeps/libm-ieee754/e_j1.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_jn.c (renamed from sysdeps/libm-ieee754/e_jn.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_lgamma_r.c (renamed from sysdeps/libm-ieee754/e_lgamma_r.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_log.c (renamed from sysdeps/libm-ieee754/e_log.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_log10.c (renamed from sysdeps/libm-ieee754/e_log10.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_pow.c (renamed from sysdeps/libm-ieee754/e_pow.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_rem_pio2.c (renamed from sysdeps/libm-ieee754/e_rem_pio2.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_remainder.c (renamed from sysdeps/libm-ieee754/e_remainder.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_sinh.c (renamed from sysdeps/libm-ieee754/e_sinh.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/e_sqrt.c (renamed from sysdeps/libm-ieee754/e_sqrt.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/k_cos.c (renamed from sysdeps/libm-ieee754/k_cos.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/k_rem_pio2.c (renamed from sysdeps/libm-ieee754/k_rem_pio2.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/k_sin.c (renamed from sysdeps/libm-ieee754/k_sin.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/k_tan.c (renamed from sysdeps/libm-ieee754/k_tan.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/mpn2dbl.c (renamed from sysdeps/ieee754/mpn2dbl.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_asinh.c (renamed from sysdeps/libm-ieee754/s_asinh.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_atan.c (renamed from sysdeps/libm-ieee754/s_atan.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_cbrt.c (renamed from sysdeps/libm-ieee754/s_cbrt.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_ceil.c (renamed from sysdeps/libm-ieee754/s_ceil.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_copysign.c (renamed from sysdeps/libm-ieee754/s_copysign.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_cos.c (renamed from sysdeps/libm-ieee754/s_cos.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_erf.c (renamed from sysdeps/libm-ieee754/s_erf.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_exp2.c (renamed from sysdeps/libm-ieee754/s_exp2.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_expm1.c (renamed from sysdeps/libm-ieee754/s_expm1.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_fabs.c (renamed from sysdeps/libm-ieee754/s_fabs.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_finite.c (renamed from sysdeps/libm-ieee754/s_finite.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_floor.c (renamed from sysdeps/libm-ieee754/s_floor.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_fpclassify.c (renamed from sysdeps/libm-ieee754/s_fpclassify.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_frexp.c (renamed from sysdeps/libm-ieee754/s_frexp.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_ilogb.c (renamed from sysdeps/libm-ieee754/s_ilogb.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_isinf.c (renamed from sysdeps/libm-ieee754/s_isinf.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_isnan.c (renamed from sysdeps/libm-ieee754/s_isnan.c)2
-rw-r--r--sysdeps/ieee754/dbl-64/s_llrint.c (renamed from sysdeps/libm-ieee754/s_llrint.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_llround.c (renamed from sysdeps/libm-ieee754/s_llround.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_log1p.c (renamed from sysdeps/libm-ieee754/s_log1p.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_log2.c (renamed from sysdeps/libm-ieee754/s_log2.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_logb.c (renamed from sysdeps/libm-ieee754/s_logb.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_lrint.c (renamed from sysdeps/libm-ieee754/s_lrint.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_lround.c (renamed from sysdeps/libm-ieee754/s_lround.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_modf.c (renamed from sysdeps/libm-ieee754/s_modf.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_nearbyint.c (renamed from sysdeps/libm-ieee754/s_nearbyint.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_nexttoward.c1
-rw-r--r--sysdeps/ieee754/dbl-64/s_remquo.c (renamed from sysdeps/libm-ieee754/s_remquo.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_rint.c (renamed from sysdeps/libm-ieee754/s_rint.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_round.c (renamed from sysdeps/libm-ieee754/s_round.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_scalbln.c (renamed from sysdeps/libm-ieee754/s_scalbln.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_scalbn.c (renamed from sysdeps/libm-ieee754/s_scalbn.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_signbit.c (renamed from sysdeps/libm-ieee754/s_signbit.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_sin.c (renamed from sysdeps/libm-ieee754/s_sin.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_sincos.c (renamed from sysdeps/libm-ieee754/s_sincos.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_tan.c (renamed from sysdeps/libm-ieee754/s_tan.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_tanh.c (renamed from sysdeps/libm-ieee754/s_tanh.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/s_trunc.c (renamed from sysdeps/libm-ieee754/s_trunc.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/t_exp.c (renamed from sysdeps/libm-ieee754/t_exp.c)0
-rw-r--r--sysdeps/ieee754/dbl-64/t_exp2.h (renamed from sysdeps/libm-ieee754/t_exp2.h)0
-rw-r--r--sysdeps/ieee754/dbl-64/w_exp.c (renamed from sysdeps/libm-ieee754/w_exp.c)0
-rw-r--r--sysdeps/ieee754/flt-32/Dist (renamed from sysdeps/libm-ieee754/Dist)1
-rw-r--r--sysdeps/ieee754/flt-32/e_acosf.c (renamed from sysdeps/libm-ieee754/e_acosf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_acoshf.c (renamed from sysdeps/libm-ieee754/e_acoshf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_asinf.c (renamed from sysdeps/libm-ieee754/e_asinf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_atan2f.c (renamed from sysdeps/libm-ieee754/e_atan2f.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_atanhf.c (renamed from sysdeps/libm-ieee754/e_atanhf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_coshf.c (renamed from sysdeps/libm-ieee754/e_coshf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_expf.c (renamed from sysdeps/libm-ieee754/e_expf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_fmodf.c (renamed from sysdeps/libm-ieee754/e_fmodf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_gammaf_r.c (renamed from sysdeps/libm-ieee754/e_gammaf_r.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_hypotf.c (renamed from sysdeps/libm-ieee754/e_hypotf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_j0f.c (renamed from sysdeps/libm-ieee754/e_j0f.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_j1f.c (renamed from sysdeps/libm-ieee754/e_j1f.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_jnf.c (renamed from sysdeps/libm-ieee754/e_jnf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_lgammaf_r.c (renamed from sysdeps/libm-ieee754/e_lgammaf_r.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_log10f.c (renamed from sysdeps/libm-ieee754/e_log10f.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_logf.c (renamed from sysdeps/libm-ieee754/e_logf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_powf.c (renamed from sysdeps/libm-ieee754/e_powf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_rem_pio2f.c (renamed from sysdeps/libm-ieee754/e_rem_pio2f.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_remainderf.c (renamed from sysdeps/libm-ieee754/e_remainderf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_sinhf.c (renamed from sysdeps/libm-ieee754/e_sinhf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/e_sqrtf.c (renamed from sysdeps/libm-ieee754/e_sqrtf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/k_cosf.c (renamed from sysdeps/libm-ieee754/k_cosf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/k_rem_pio2f.c (renamed from sysdeps/libm-ieee754/k_rem_pio2f.c)0
-rw-r--r--sysdeps/ieee754/flt-32/k_sinf.c (renamed from sysdeps/libm-ieee754/k_sinf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/k_tanf.c (renamed from sysdeps/libm-ieee754/k_tanf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/mpn2flt.c (renamed from sysdeps/ieee754/mpn2flt.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_asinhf.c (renamed from sysdeps/libm-ieee754/s_asinhf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_atanf.c (renamed from sysdeps/libm-ieee754/s_atanf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_cbrtf.c (renamed from sysdeps/libm-ieee754/s_cbrtf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_ceilf.c (renamed from sysdeps/libm-ieee754/s_ceilf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_copysignf.c (renamed from sysdeps/libm-ieee754/s_copysignf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_cosf.c (renamed from sysdeps/libm-ieee754/s_cosf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_erff.c (renamed from sysdeps/libm-ieee754/s_erff.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_exp2f.c (renamed from sysdeps/libm-ieee754/s_exp2f.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_expm1f.c (renamed from sysdeps/libm-ieee754/s_expm1f.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_fabsf.c (renamed from sysdeps/libm-ieee754/s_fabsf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_finitef.c (renamed from sysdeps/libm-ieee754/s_finitef.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_floorf.c (renamed from sysdeps/libm-ieee754/s_floorf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_fpclassifyf.c (renamed from sysdeps/libm-ieee754/s_fpclassifyf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_frexpf.c (renamed from sysdeps/libm-ieee754/s_frexpf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_ilogbf.c (renamed from sysdeps/libm-ieee754/s_ilogbf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_isinff.c (renamed from sysdeps/libm-ieee754/s_isinff.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_isnanf.c (renamed from sysdeps/libm-ieee754/s_isnanf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_llrintf.c (renamed from sysdeps/libm-ieee754/s_llrintf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_llroundf.c (renamed from sysdeps/libm-ieee754/s_llroundf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_log1pf.c (renamed from sysdeps/libm-ieee754/s_log1pf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_log2f.c (renamed from sysdeps/libm-ieee754/s_log2f.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_logbf.c (renamed from sysdeps/libm-ieee754/s_logbf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_lrintf.c (renamed from sysdeps/libm-ieee754/s_lrintf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_lroundf.c (renamed from sysdeps/libm-ieee754/s_lroundf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_modff.c (renamed from sysdeps/libm-ieee754/s_modff.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_nearbyintf.c (renamed from sysdeps/libm-ieee754/s_nearbyintf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_nextafterf.c (renamed from sysdeps/libm-ieee754/s_nextafterf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_remquof.c (renamed from sysdeps/libm-ieee754/s_remquof.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_rintf.c (renamed from sysdeps/libm-ieee754/s_rintf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_roundf.c (renamed from sysdeps/libm-ieee754/s_roundf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_scalblnf.c (renamed from sysdeps/libm-ieee754/s_scalblnf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_scalbnf.c (renamed from sysdeps/libm-ieee754/s_scalbnf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_signbitf.c (renamed from sysdeps/libm-ieee754/s_signbitf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_sincosf.c (renamed from sysdeps/libm-ieee754/s_sincosf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_sinf.c (renamed from sysdeps/libm-ieee754/s_sinf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_tanf.c (renamed from sysdeps/libm-ieee754/s_tanf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_tanhf.c (renamed from sysdeps/libm-ieee754/s_tanhf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/s_truncf.c (renamed from sysdeps/libm-ieee754/s_truncf.c)0
-rw-r--r--sysdeps/ieee754/flt-32/t_exp2f.h (renamed from sysdeps/libm-ieee754/t_exp2f.h)0
-rw-r--r--sysdeps/ieee754/flt-32/w_expf.c (renamed from sysdeps/libm-ieee754/w_expf.c)0
-rw-r--r--sysdeps/ieee754/k_standard.c (renamed from sysdeps/libm-ieee754/k_standard.c)0
-rw-r--r--sysdeps/ieee754/ldbl-128/e_acoshl.c68
-rw-r--r--sysdeps/ieee754/ldbl-128/e_atan2l.c129
-rw-r--r--sysdeps/ieee754/ldbl-128/e_fmodl.c138
-rw-r--r--sysdeps/ieee754/ldbl-128/e_gammal_r.c52
-rw-r--r--sysdeps/ieee754/ldbl-128/e_remainderl.c78
-rw-r--r--sysdeps/ieee754/ldbl-128/ieee754.h171
-rw-r--r--sysdeps/ieee754/ldbl-128/ldbl2mpn.c137
-rw-r--r--sysdeps/ieee754/ldbl-128/math_ldbl.h82
-rw-r--r--sysdeps/ieee754/ldbl-128/mpn2ldbl.c51
-rw-r--r--sysdeps/ieee754/ldbl-128/printf_fphex.c84
-rw-r--r--sysdeps/ieee754/ldbl-128/s_ceill.c84
-rw-r--r--sysdeps/ieee754/ldbl-128/s_copysignl.c (renamed from sysdeps/libm-ieee754/w_fmodl.c)33
-rw-r--r--sysdeps/ieee754/ldbl-128/s_cosl.c83
-rw-r--r--sysdeps/ieee754/ldbl-128/s_fabsl.c (renamed from sysdeps/libm-ieee754/w_sqrtl.c)28
-rw-r--r--sysdeps/ieee754/ldbl-128/s_finitel.c (renamed from sysdeps/libm-ieee754/w_acosl.c)30
-rw-r--r--sysdeps/ieee754/ldbl-128/s_floorl.c85
-rw-r--r--sysdeps/ieee754/ldbl-128/s_fpclassifyl.c44
-rw-r--r--sysdeps/ieee754/ldbl-128/s_frexpl.c63
-rw-r--r--sysdeps/ieee754/ldbl-128/s_ilogbl.c55
-rw-r--r--sysdeps/ieee754/ldbl-128/s_isinfl.c28
-rw-r--r--sysdeps/ieee754/ldbl-128/s_isnanl.c (renamed from sysdeps/libm-ieee754/w_sinhl.c)31
-rw-r--r--sysdeps/ieee754/ldbl-128/s_llrintl.c75
-rw-r--r--sysdeps/ieee754/ldbl-128/s_llroundl.c74
-rw-r--r--sysdeps/ieee754/ldbl-128/s_logbl.c46
-rw-r--r--sysdeps/ieee754/ldbl-128/s_lrintl.c91
-rw-r--r--sysdeps/ieee754/ldbl-128/s_lroundl.c74
-rw-r--r--sysdeps/ieee754/ldbl-128/s_modfl.c88
-rw-r--r--sysdeps/ieee754/ldbl-128/s_nearbyintl.c93
-rw-r--r--sysdeps/ieee754/ldbl-128/s_nextafterl.c85
-rw-r--r--sysdeps/ieee754/ldbl-128/s_nexttoward.c97
-rw-r--r--sysdeps/ieee754/ldbl-128/s_nexttowardf.c81
-rw-r--r--sysdeps/ieee754/ldbl-128/s_remquol.c110
-rw-r--r--sysdeps/ieee754/ldbl-128/s_rintl.c90
-rw-r--r--sysdeps/ieee754/ldbl-128/s_roundl.c94
-rw-r--r--sysdeps/ieee754/ldbl-128/s_scalblnl.c70
-rw-r--r--sysdeps/ieee754/ldbl-128/s_scalbnl.c70
-rw-r--r--sysdeps/ieee754/ldbl-128/s_signbitl.c32
-rw-r--r--sysdeps/ieee754/ldbl-128/s_sincosl.c77
-rw-r--r--sysdeps/ieee754/ldbl-128/s_sinl.c83
-rw-r--r--sysdeps/ieee754/ldbl-128/s_tanl.c77
-rw-r--r--sysdeps/ieee754/ldbl-128/s_truncl.c57
-rw-r--r--sysdeps/ieee754/ldbl-128/strtold.c42
-rw-r--r--sysdeps/ieee754/ldbl-96/e_acoshl.c (renamed from sysdeps/libm-ieee754/e_acoshl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/e_atan2l.c (renamed from sysdeps/libm-ieee754/e_atan2l.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/e_atanhl.c (renamed from sysdeps/libm-ieee754/e_atanhl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/e_coshl.c (renamed from sysdeps/libm-ieee754/e_coshl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/e_gammal_r.c (renamed from sysdeps/libm-ieee754/e_gammal_r.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/e_hypotl.c (renamed from sysdeps/libm-ieee754/e_hypotl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/e_remainderl.c (renamed from sysdeps/libm-ieee754/e_remainderl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/e_sinhl.c (renamed from sysdeps/libm-ieee754/e_sinhl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/ldbl2mpn.c (renamed from sysdeps/ieee754/ldbl2mpn.c)4
-rw-r--r--sysdeps/ieee754/ldbl-96/math_ldbl.h98
-rw-r--r--sysdeps/ieee754/ldbl-96/mpn2ldbl.c (renamed from sysdeps/ieee754/mpn2ldbl.c)4
-rw-r--r--sysdeps/ieee754/ldbl-96/printf_fphex.c61
-rw-r--r--sysdeps/ieee754/ldbl-96/s_asinhl.c (renamed from sysdeps/libm-ieee754/s_asinhl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_cbrtl.c (renamed from sysdeps/libm-ieee754/s_cbrtl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_ceill.c (renamed from sysdeps/libm-ieee754/s_ceill.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_copysignl.c (renamed from sysdeps/libm-ieee754/s_copysignl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_cosl.c (renamed from sysdeps/libm-ieee754/s_cosl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_fabsl.c (renamed from sysdeps/libm-ieee754/s_fabsl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_finitel.c (renamed from sysdeps/libm-ieee754/s_finitel.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_floorl.c (renamed from sysdeps/libm-ieee754/s_floorl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_fpclassifyl.c (renamed from sysdeps/libm-ieee754/s_fpclassifyl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_frexpl.c (renamed from sysdeps/libm-ieee754/s_frexpl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_ilogbl.c (renamed from sysdeps/libm-ieee754/s_ilogbl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_isinfl.c (renamed from sysdeps/libm-ieee754/s_isinfl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_isnanl.c (renamed from sysdeps/libm-ieee754/s_isnanl.c)2
-rw-r--r--sysdeps/ieee754/ldbl-96/s_llrintl.c (renamed from sysdeps/libm-ieee754/s_llrintl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_llroundl.c (renamed from sysdeps/libm-ieee754/s_llroundl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_logbl.c (renamed from sysdeps/libm-ieee754/s_logbl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_lrintl.c (renamed from sysdeps/libm-ieee754/s_lrintl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_lroundl.c (renamed from sysdeps/libm-ieee754/s_lroundl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_modfl.c (renamed from sysdeps/libm-ieee754/s_modfl.c)2
-rw-r--r--sysdeps/ieee754/ldbl-96/s_nearbyintl.c (renamed from sysdeps/libm-ieee754/s_nearbyintl.c)7
-rw-r--r--sysdeps/ieee754/ldbl-96/s_nextafterl.c (renamed from sysdeps/libm-ieee754/s_nextafterl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_nexttoward.c (renamed from sysdeps/libm-ieee754/s_nexttoward.c)8
-rw-r--r--sysdeps/ieee754/ldbl-96/s_nexttowardf.c (renamed from sysdeps/libm-ieee754/s_nexttowardf.c)8
-rw-r--r--sysdeps/ieee754/ldbl-96/s_remquol.c (renamed from sysdeps/libm-ieee754/s_remquol.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_rintl.c (renamed from sysdeps/libm-ieee754/s_rintl.c)7
-rw-r--r--sysdeps/ieee754/ldbl-96/s_roundl.c (renamed from sysdeps/libm-ieee754/s_roundl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_scalblnl.c (renamed from sysdeps/libm-ieee754/s_scalblnl.c)2
-rw-r--r--sysdeps/ieee754/ldbl-96/s_scalbnl.c (renamed from sysdeps/libm-ieee754/s_scalbnl.c)2
-rw-r--r--sysdeps/ieee754/ldbl-96/s_signbitl.c (renamed from sysdeps/libm-ieee754/s_signbitl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_sincosl.c (renamed from sysdeps/libm-ieee754/s_sincosl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_sinl.c (renamed from sysdeps/libm-ieee754/s_sinl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_tanhl.c (renamed from sysdeps/libm-ieee754/s_tanhl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_tanl.c (renamed from sysdeps/libm-ieee754/s_tanl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/s_truncl.c (renamed from sysdeps/libm-ieee754/s_truncl.c)0
-rw-r--r--sysdeps/ieee754/ldbl-96/strtold.c42
-rw-r--r--sysdeps/ieee754/ldbl-96/w_expl.c (renamed from sysdeps/libm-ieee754/w_expl.c)0
-rw-r--r--sysdeps/ieee754/s_lib_version.c (renamed from sysdeps/libm-ieee754/s_lib_version.c)0
-rw-r--r--sysdeps/ieee754/s_matherr.c (renamed from sysdeps/libm-ieee754/s_matherr.c)0
-rw-r--r--sysdeps/ieee754/s_signgam.c (renamed from sysdeps/libm-ieee754/s_signgam.c)0
-rw-r--r--sysdeps/libm-ieee754/w_acos.c48
-rw-r--r--sysdeps/libm-ieee754/w_acosf.c48
-rw-r--r--sysdeps/libm-ieee754/w_acosh.c47
-rw-r--r--sysdeps/libm-ieee754/w_acoshf.c48
-rw-r--r--sysdeps/libm-ieee754/w_acoshl.c47
-rw-r--r--sysdeps/libm-ieee754/w_asin.c49
-rw-r--r--sysdeps/libm-ieee754/w_asinf.c49
-rw-r--r--sysdeps/libm-ieee754/w_asinl.c49
-rw-r--r--sysdeps/libm-ieee754/w_atan2.c47
-rw-r--r--sysdeps/libm-ieee754/w_atan2f.c46
-rw-r--r--sysdeps/libm-ieee754/w_atan2l.c47
-rw-r--r--sysdeps/libm-ieee754/w_atanh.c52
-rw-r--r--sysdeps/libm-ieee754/w_atanhf.c53
-rw-r--r--sysdeps/libm-ieee754/w_atanhl.c52
-rw-r--r--sysdeps/libm-ieee754/w_cosh.c47
-rw-r--r--sysdeps/libm-ieee754/w_coshf.c47
-rw-r--r--sysdeps/libm-ieee754/w_coshl.c47
-rw-r--r--sysdeps/libm-ieee754/w_drem.c20
-rw-r--r--sysdeps/libm-ieee754/w_dremf.c17
-rw-r--r--sysdeps/libm-ieee754/w_dreml.c18
-rw-r--r--sysdeps/libm-ieee754/w_exp10.c61
-rw-r--r--sysdeps/libm-ieee754/w_exp10f.c57
-rw-r--r--sysdeps/libm-ieee754/w_exp10l.c56
-rw-r--r--sysdeps/libm-ieee754/w_exp2.c36
-rw-r--r--sysdeps/libm-ieee754/w_exp2f.c32
-rw-r--r--sysdeps/libm-ieee754/w_exp2l.c30
-rw-r--r--sysdeps/libm-ieee754/w_fmod.c48
-rw-r--r--sysdeps/libm-ieee754/w_fmodf.c48
-rw-r--r--sysdeps/libm-ieee754/w_hypot.c48
-rw-r--r--sysdeps/libm-ieee754/w_hypotf.c48
-rw-r--r--sysdeps/libm-ieee754/w_hypotl.c48
-rw-r--r--sysdeps/libm-ieee754/w_j0.c76
-rw-r--r--sysdeps/libm-ieee754/w_j0f.c74
-rw-r--r--sysdeps/libm-ieee754/w_j0l.c73
-rw-r--r--sysdeps/libm-ieee754/w_j1.c77
-rw-r--r--sysdeps/libm-ieee754/w_j1f.c75
-rw-r--r--sysdeps/libm-ieee754/w_j1l.c74
-rw-r--r--sysdeps/libm-ieee754/w_jn.c99
-rw-r--r--sysdeps/libm-ieee754/w_jnf.c71
-rw-r--r--sysdeps/libm-ieee754/w_jnl.c96
-rw-r--r--sysdeps/libm-ieee754/w_lgamma.c60
-rw-r--r--sysdeps/libm-ieee754/w_lgamma_r.c51
-rw-r--r--sysdeps/libm-ieee754/w_lgammaf.c53
-rw-r--r--sysdeps/libm-ieee754/w_lgammaf_r.c52
-rw-r--r--sysdeps/libm-ieee754/w_lgammal.c58
-rw-r--r--sysdeps/libm-ieee754/w_lgammal_r.c52
-rw-r--r--sysdeps/libm-ieee754/w_log.c48
-rw-r--r--sysdeps/libm-ieee754/w_log10.c51
-rw-r--r--sysdeps/libm-ieee754/w_log10f.c52
-rw-r--r--sysdeps/libm-ieee754/w_log10l.c51
-rw-r--r--sysdeps/libm-ieee754/w_logf.c49
-rw-r--r--sysdeps/libm-ieee754/w_logl.c48
-rw-r--r--sysdeps/libm-ieee754/w_pow.c70
-rw-r--r--sysdeps/libm-ieee754/w_powf.c77
-rw-r--r--sysdeps/libm-ieee754/w_powl.c68
-rw-r--r--sysdeps/libm-ieee754/w_remainder.c47
-rw-r--r--sysdeps/libm-ieee754/w_remainderf.c47
-rw-r--r--sysdeps/libm-ieee754/w_remainderl.c48
-rw-r--r--sysdeps/libm-ieee754/w_scalb.c65
-rw-r--r--sysdeps/libm-ieee754/w_scalbf.c66
-rw-r--r--sysdeps/libm-ieee754/w_scalbl.c65
-rw-r--r--sysdeps/libm-ieee754/w_sinh.c47
-rw-r--r--sysdeps/libm-ieee754/w_sinhf.c47
-rw-r--r--sysdeps/libm-ieee754/w_sqrt.c47
-rw-r--r--sysdeps/libm-ieee754/w_sqrtf.c47
-rw-r--r--sysdeps/libm-ieee754/w_tgamma.c54
-rw-r--r--sysdeps/libm-ieee754/w_tgammaf.c50
-rw-r--r--sysdeps/libm-ieee754/w_tgammal.c53
-rw-r--r--sysdeps/m68k/Implies4
-rw-r--r--sysdeps/m68k/printf_fphex.c2
-rw-r--r--sysdeps/m68k/strtold.c2
-rw-r--r--sysdeps/mips/Implies3
-rw-r--r--sysdeps/mips/mips64/Implies3
-rw-r--r--sysdeps/powerpc/Implies3
-rw-r--r--sysdeps/sparc/Implies2
-rw-r--r--sysdeps/sparc/fpu/bits/mathdef.h15
-rw-r--r--sysdeps/sparc/fpu/bits/mathinline.h211
-rw-r--r--sysdeps/sparc/sparc32/Implies3
-rw-r--r--sysdeps/sparc/sparc32/bits/wordsize.h (renamed from sysdeps/sparc/bits/wordsize.h)0
-rw-r--r--sysdeps/sparc/sparc32/fpu/bits/huge_val.h100
-rw-r--r--sysdeps/sparc/sparc64/Implies4
-rw-r--r--sysdeps/sparc/sparc64/Makefile13
-rw-r--r--sysdeps/sparc/sparc64/addmul_1.S36
-rw-r--r--sysdeps/sparc/sparc64/bits/wordsize.h7
-rw-r--r--sysdeps/sparc/sparc64/fpu/bits/huge_val.h100
579 files changed, 4018 insertions, 3938 deletions
diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies
index 37fee79d97..2c6af5b7bb 100644
--- a/sysdeps/alpha/Implies
+++ b/sysdeps/alpha/Implies
@@ -1,3 +1,4 @@
 wordsize-64
-# Alpha uses IEEE 754 floating point.
-ieee754
+# Alpha uses IEEE 754 single and double precision floating point.
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/arm/Implies b/sysdeps/arm/Implies
index d6acf04a82..780c4e2467 100644
--- a/sysdeps/arm/Implies
+++ b/sysdeps/arm/Implies
@@ -1,2 +1,3 @@
 wordsize-32
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/generic/e_atanhl.c b/sysdeps/generic/e_atanhl.c
new file mode 100644
index 0000000000..625d42db31
--- /dev/null
+++ b/sysdeps/generic/e_atanhl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_atanhl (long double x)
+{
+  fputs ("__ieee754_atanhl not implemented\n", stderr);
+  __set_errno (ENOSYS);
+  return 0.0;
+}
+
+stub_warning (__ieee754_atanhl)
+#include <stub-tag.h>
diff --git a/sysdeps/generic/e_coshl.c b/sysdeps/generic/e_coshl.c
new file mode 100644
index 0000000000..0da319b785
--- /dev/null
+++ b/sysdeps/generic/e_coshl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_coshl (long double x)
+{
+  fputs ("__ieee754_coshl not implemented\n", stderr);
+  __set_errno (ENOSYS);
+  return 0.0;
+}
+
+stub_warning (__ieee754_coshl)
+#include <stub-tag.h>
diff --git a/sysdeps/libm-ieee754/e_exp10.c b/sysdeps/generic/e_exp10.c
index 55d676ec09..55d676ec09 100644
--- a/sysdeps/libm-ieee754/e_exp10.c
+++ b/sysdeps/generic/e_exp10.c
diff --git a/sysdeps/libm-ieee754/e_exp10f.c b/sysdeps/generic/e_exp10f.c
index d6cc9dc03d..d6cc9dc03d 100644
--- a/sysdeps/libm-ieee754/e_exp10f.c
+++ b/sysdeps/generic/e_exp10f.c
diff --git a/sysdeps/libm-ieee754/e_exp10l.c b/sysdeps/generic/e_exp10l.c
index cf8658b747..cf8658b747 100644
--- a/sysdeps/libm-ieee754/e_exp10l.c
+++ b/sysdeps/generic/e_exp10l.c
diff --git a/sysdeps/generic/e_gammal_r.c b/sysdeps/generic/e_gammal_r.c
new file mode 100644
index 0000000000..16b641bdd9
--- /dev/null
+++ b/sysdeps/generic/e_gammal_r.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_gammal_r (long double x, int *signgamp)
+{
+  fputs ("__ieee754_gammal_r not implemented\n", stderr);
+  __set_errno (ENOSYS);
+  return 0.0;
+}
+
+stub_warning (__ieee754_gammal_r)
+#include <stub-tag.h>
diff --git a/sysdeps/generic/e_hypotl.c b/sysdeps/generic/e_hypotl.c
new file mode 100644
index 0000000000..07df22eb36
--- /dev/null
+++ b/sysdeps/generic/e_hypotl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_hypotl (long double x, long double y)
+{
+  fputs ("__ieee754_hypotl not implemented\n", stderr);
+  __set_errno (ENOSYS);
+  return 0.0;
+}
+
+stub_warning (__ieee754_hypotl)
+#include <stub-tag.h>
diff --git a/sysdeps/libm-ieee754/e_scalb.c b/sysdeps/generic/e_scalb.c
index d9a326b2b2..d9a326b2b2 100644
--- a/sysdeps/libm-ieee754/e_scalb.c
+++ b/sysdeps/generic/e_scalb.c
diff --git a/sysdeps/libm-ieee754/e_scalbf.c b/sysdeps/generic/e_scalbf.c
index f51057e7b4..f51057e7b4 100644
--- a/sysdeps/libm-ieee754/e_scalbf.c
+++ b/sysdeps/generic/e_scalbf.c
diff --git a/sysdeps/libm-ieee754/e_scalbl.c b/sysdeps/generic/e_scalbl.c
index dccc876c85..dccc876c85 100644
--- a/sysdeps/libm-ieee754/e_scalbl.c
+++ b/sysdeps/generic/e_scalbl.c
diff --git a/sysdeps/generic/e_sinhl.c b/sysdeps/generic/e_sinhl.c
new file mode 100644
index 0000000000..4cec79cb2d
--- /dev/null
+++ b/sysdeps/generic/e_sinhl.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__ieee754_sinhl (long double x)
+{
+  fputs ("__ieee754_sinhl not implemented\n", stderr);
+  __set_errno (ENOSYS);
+  return 0.0;
+}
+
+stub_warning (__ieee754_sinhl)
+#include <stub-tag.h>
diff --git a/sysdeps/generic/ldbl2mpn.c b/sysdeps/generic/ldbl2mpn.c
index e456d59e1d..450f9381cc 100644
--- a/sysdeps/generic/ldbl2mpn.c
+++ b/sysdeps/generic/ldbl2mpn.c
@@ -1,32 +1 @@
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#include "gmp.h"
-#include "gmp-impl.h"
-
-/* Convert a `long double' to a multi-precision integer representing the
-   significand scaled up by the highest possible number of significant bits
-   of fraction (LDBL_MANT_DIG), and an integral power of two (MPN frexpl). */
-
-mp_size_t
-__mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
-		      int *expt, int *is_neg,
-		      double value)
-{
-#error "not implemented for this floating point format"
-}
+/* Empty.  Not needed unless ldbl support is in. */
diff --git a/sysdeps/generic/math_ldbl.h b/sysdeps/generic/math_ldbl.h
new file mode 100644
index 0000000000..83684e61c4
--- /dev/null
+++ b/sysdeps/generic/math_ldbl.h
@@ -0,0 +1,5 @@
+#ifndef _MATH_PRIVATE_H
+#error "Never use <math_ldbl.h> directly; include <math_private.h> instead."
+#endif
+
+/* This is empty.  Any machine using long double type will override this header.  */
diff --git a/sysdeps/generic/mpn2ldbl.c b/sysdeps/generic/mpn2ldbl.c
index c269ce689b..450f9381cc 100644
--- a/sysdeps/generic/mpn2ldbl.c
+++ b/sysdeps/generic/mpn2ldbl.c
@@ -1,30 +1 @@
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#include "gmp.h"
-#include "gmp-impl.h"
-#include <float.h>
-
-/* Convert a multi-precision integer of the needed number of bits and an
-   integral power of two to a `long double'.  */
-
-long double
-__mpn_construct_long_double (mp_srcptr frac_ptr, int expt, int negative)
-{
-#error "__mpn_construct_long_double not implemented for floating point format"
-}
+/* Empty.  Not needed unless ldbl support is in. */
diff --git a/sysdeps/generic/printf_fphex.c b/sysdeps/generic/printf_fphex.c
index 9e9fd07dfc..53e3254286 100644
--- a/sysdeps/generic/printf_fphex.c
+++ b/sysdeps/generic/printf_fphex.c
@@ -106,8 +106,8 @@ __printf_fphex (FILE *fp,
   const char *special = NULL;
 
   /* Buffer for the generated number string for the mantissa.  The
-     maximal size for the mantissa is 64 bits.  */
-  char numbuf[16];
+     maximal size for the mantissa is 128 bits.  */
+  char numbuf[32];
   char *numstr;
   char *numend;
   int negative;
@@ -229,8 +229,6 @@ __printf_fphex (FILE *fp,
       return done;
     }
 
-  /* We are handling here only 64 and 80 bit IEEE foating point
-     numbers.  */
   if (info->is_long_double == 0 || sizeof (double) == sizeof (long double))
     {
       /* We have 52 bits of mantissa plus one implicit digit.  Since
@@ -281,64 +279,10 @@ __printf_fphex (FILE *fp,
 	  exponent = -(exponent - IEEE754_DOUBLE_BIAS);
 	}
     }
+#ifdef PRINT_FPHEX_LONG_DOUBLE
   else
-    {
-      /* The "strange" 80 bit format on ix86 and m68k has an explicit
-	 leading digit in the 64 bit mantissa.  */
-      unsigned long long int num;
-
-      assert (sizeof (long double) == 12);
-
-      num = (((unsigned long long int) fpnum.ldbl.ieee.mantissa0) << 32
-	     | fpnum.ldbl.ieee.mantissa1);
-
-      zero_mantissa = num == 0;
-
-      if (sizeof (unsigned long int) > 6)
-	numstr = _itoa_word (num, numbuf + sizeof numbuf, 16,
-			     info->spec == 'A');
-      else
-	numstr = _itoa (num, numbuf + sizeof numbuf, 16, info->spec == 'A');
-
-      /* Fill with zeroes.  */
-      while (numstr > numbuf + (sizeof numbuf - 64 / 4))
-	*--numstr = '0';
-
-      /* We use a full nibble for the leading digit.  */
-      leading = *numstr++;
-
-      /* We have 3 bits from the mantissa in the leading nibble.
-	 Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'.  */
-      exponent = fpnum.ldbl.ieee.exponent;
-
-      if (exponent == 0)
-	{
-	  if (zero_mantissa)
-	    expnegative = 0;
-	  else
-	    {
-	      /* This is a denormalized number.  */
-	      expnegative = 1;
-	      /* This is a hook for the m68k long double format, where the
-		 exponent bias is the same for normalized and denormalized
-		 numbers.  */
-#ifndef LONG_DOUBLE_DENORM_BIAS
-# define LONG_DOUBLE_DENORM_BIAS (IEEE854_LONG_DOUBLE_BIAS - 1)
+    PRINT_FPHEX_LONG_DOUBLE;
 #endif
-	      exponent = LONG_DOUBLE_DENORM_BIAS + 3;
-	    }
-	}
-      else if (exponent >= IEEE854_LONG_DOUBLE_BIAS + 3)
-	{
-	  expnegative = 0;
-	  exponent -= IEEE854_LONG_DOUBLE_BIAS + 3;
-	}
-      else
-	{
-	  expnegative = 1;
-	  exponent = -(exponent - (IEEE854_LONG_DOUBLE_BIAS + 3));
-	}
-    }
 
   /* Look for trailing zeroes.  */
   if (! zero_mantissa)
diff --git a/sysdeps/generic/s_asinhl.c b/sysdeps/generic/s_asinhl.c
new file mode 100644
index 0000000000..1d5cf47a4f
--- /dev/null
+++ b/sysdeps/generic/s_asinhl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__asinhl(long double x)
+{
+  fputs ("__asinhl not implemented\n", stderr);
+  __set_errno (ENOSYS);
+  return 0.0;
+}
+
+weak_alias (__asinhl, asinhl)
+stub_warning (asinhl)
+#include <stub-tag.h>
diff --git a/sysdeps/libm-ieee754/s_cacos.c b/sysdeps/generic/s_cacos.c
index 9b007598f0..9b007598f0 100644
--- a/sysdeps/libm-ieee754/s_cacos.c
+++ b/sysdeps/generic/s_cacos.c
diff --git a/sysdeps/libm-ieee754/s_cacosf.c b/sysdeps/generic/s_cacosf.c
index 6fb132dc23..6fb132dc23 100644
--- a/sysdeps/libm-ieee754/s_cacosf.c
+++ b/sysdeps/generic/s_cacosf.c
diff --git a/sysdeps/libm-ieee754/s_cacosh.c b/sysdeps/generic/s_cacosh.c
index d938c64473..d938c64473 100644
--- a/sysdeps/libm-ieee754/s_cacosh.c
+++ b/sysdeps/generic/s_cacosh.c
diff --git a/sysdeps/libm-ieee754/s_cacoshf.c b/sysdeps/generic/s_cacoshf.c
index 6aa33e5a48..6aa33e5a48 100644
--- a/sysdeps/libm-ieee754/s_cacoshf.c
+++ b/sysdeps/generic/s_cacoshf.c
diff --git a/sysdeps/libm-ieee754/s_cacoshl.c b/sysdeps/generic/s_cacoshl.c
index 1c91e93fab..1c91e93fab 100644
--- a/sysdeps/libm-ieee754/s_cacoshl.c
+++ b/sysdeps/generic/s_cacoshl.c
diff --git a/sysdeps/libm-ieee754/s_cacosl.c b/sysdeps/generic/s_cacosl.c
index 40ad812aa1..40ad812aa1 100644
--- a/sysdeps/libm-ieee754/s_cacosl.c
+++ b/sysdeps/generic/s_cacosl.c
diff --git a/sysdeps/libm-ieee754/s_casin.c b/sysdeps/generic/s_casin.c
index 516aea0464..516aea0464 100644
--- a/sysdeps/libm-ieee754/s_casin.c
+++ b/sysdeps/generic/s_casin.c
diff --git a/sysdeps/libm-ieee754/s_casinf.c b/sysdeps/generic/s_casinf.c
index aaf0d66c28..aaf0d66c28 100644
--- a/sysdeps/libm-ieee754/s_casinf.c
+++ b/sysdeps/generic/s_casinf.c
diff --git a/sysdeps/libm-ieee754/s_casinh.c b/sysdeps/generic/s_casinh.c
index da7d1ed429..da7d1ed429 100644
--- a/sysdeps/libm-ieee754/s_casinh.c
+++ b/sysdeps/generic/s_casinh.c
diff --git a/sysdeps/libm-ieee754/s_casinhf.c b/sysdeps/generic/s_casinhf.c
index e8441f4fa0..e8441f4fa0 100644
--- a/sysdeps/libm-ieee754/s_casinhf.c
+++ b/sysdeps/generic/s_casinhf.c
diff --git a/sysdeps/libm-ieee754/s_casinhl.c b/sysdeps/generic/s_casinhl.c
index 44e07f773f..44e07f773f 100644
--- a/sysdeps/libm-ieee754/s_casinhl.c
+++ b/sysdeps/generic/s_casinhl.c
diff --git a/sysdeps/libm-ieee754/s_casinl.c b/sysdeps/generic/s_casinl.c
index cc750d4a11..cc750d4a11 100644
--- a/sysdeps/libm-ieee754/s_casinl.c
+++ b/sysdeps/generic/s_casinl.c
diff --git a/sysdeps/libm-ieee754/s_catan.c b/sysdeps/generic/s_catan.c
index a3fc9ad3e8..a3fc9ad3e8 100644
--- a/sysdeps/libm-ieee754/s_catan.c
+++ b/sysdeps/generic/s_catan.c
diff --git a/sysdeps/libm-ieee754/s_catanf.c b/sysdeps/generic/s_catanf.c
index 18881cd6c9..18881cd6c9 100644
--- a/sysdeps/libm-ieee754/s_catanf.c
+++ b/sysdeps/generic/s_catanf.c
diff --git a/sysdeps/libm-ieee754/s_catanh.c b/sysdeps/generic/s_catanh.c
index 0cb852a069..0cb852a069 100644
--- a/sysdeps/libm-ieee754/s_catanh.c
+++ b/sysdeps/generic/s_catanh.c
diff --git a/sysdeps/libm-ieee754/s_catanhf.c b/sysdeps/generic/s_catanhf.c
index ac0ed17edb..ac0ed17edb 100644
--- a/sysdeps/libm-ieee754/s_catanhf.c
+++ b/sysdeps/generic/s_catanhf.c
diff --git a/sysdeps/libm-ieee754/s_catanhl.c b/sysdeps/generic/s_catanhl.c
index 22f3d4b646..22f3d4b646 100644
--- a/sysdeps/libm-ieee754/s_catanhl.c
+++ b/sysdeps/generic/s_catanhl.c
diff --git a/sysdeps/libm-ieee754/s_catanl.c b/sysdeps/generic/s_catanl.c
index b7df5c39c2..b7df5c39c2 100644
--- a/sysdeps/libm-ieee754/s_catanl.c
+++ b/sysdeps/generic/s_catanl.c
diff --git a/sysdeps/generic/s_cbrtl.c b/sysdeps/generic/s_cbrtl.c
new file mode 100644
index 0000000000..d668e377af
--- /dev/null
+++ b/sysdeps/generic/s_cbrtl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__cbrtl(long double x)
+{
+  fputs ("__cbrtl not implemented\n", stderr);
+  __set_errno (ENOSYS);
+  return 0.0;
+}
+
+weak_alias (__cbrtl, cbrtl)
+stub_warning (cbrtl)
+#include <stub-tag.h>
diff --git a/sysdeps/libm-ieee754/s_ccos.c b/sysdeps/generic/s_ccos.c
index f8dfcc8af6..f8dfcc8af6 100644
--- a/sysdeps/libm-ieee754/s_ccos.c
+++ b/sysdeps/generic/s_ccos.c
diff --git a/sysdeps/libm-ieee754/s_ccosf.c b/sysdeps/generic/s_ccosf.c
index b090ae5747..b090ae5747 100644
--- a/sysdeps/libm-ieee754/s_ccosf.c
+++ b/sysdeps/generic/s_ccosf.c
diff --git a/sysdeps/libm-ieee754/s_ccosh.c b/sysdeps/generic/s_ccosh.c
index 394101f23a..394101f23a 100644
--- a/sysdeps/libm-ieee754/s_ccosh.c
+++ b/sysdeps/generic/s_ccosh.c
diff --git a/sysdeps/libm-ieee754/s_ccoshf.c b/sysdeps/generic/s_ccoshf.c
index a8043fdd39..a8043fdd39 100644
--- a/sysdeps/libm-ieee754/s_ccoshf.c
+++ b/sysdeps/generic/s_ccoshf.c
diff --git a/sysdeps/libm-ieee754/s_ccoshl.c b/sysdeps/generic/s_ccoshl.c
index 9301a9e10d..9301a9e10d 100644
--- a/sysdeps/libm-ieee754/s_ccoshl.c
+++ b/sysdeps/generic/s_ccoshl.c
diff --git a/sysdeps/libm-ieee754/s_ccosl.c b/sysdeps/generic/s_ccosl.c
index fdcc7a63dd..fdcc7a63dd 100644
--- a/sysdeps/libm-ieee754/s_ccosl.c
+++ b/sysdeps/generic/s_ccosl.c
diff --git a/sysdeps/libm-ieee754/s_cexp.c b/sysdeps/generic/s_cexp.c
index 6ba5b0a4a5..6ba5b0a4a5 100644
--- a/sysdeps/libm-ieee754/s_cexp.c
+++ b/sysdeps/generic/s_cexp.c
diff --git a/sysdeps/libm-ieee754/s_cexpf.c b/sysdeps/generic/s_cexpf.c
index 603e78d716..603e78d716 100644
--- a/sysdeps/libm-ieee754/s_cexpf.c
+++ b/sysdeps/generic/s_cexpf.c
diff --git a/sysdeps/libm-ieee754/s_cexpl.c b/sysdeps/generic/s_cexpl.c
index 67fa7a08b9..67fa7a08b9 100644
--- a/sysdeps/libm-ieee754/s_cexpl.c
+++ b/sysdeps/generic/s_cexpl.c
diff --git a/sysdeps/libm-ieee754/s_clog.c b/sysdeps/generic/s_clog.c
index c14a734759..c14a734759 100644
--- a/sysdeps/libm-ieee754/s_clog.c
+++ b/sysdeps/generic/s_clog.c
diff --git a/sysdeps/libm-ieee754/s_clog10.c b/sysdeps/generic/s_clog10.c
index 7b2e474b8f..7b2e474b8f 100644
--- a/sysdeps/libm-ieee754/s_clog10.c
+++ b/sysdeps/generic/s_clog10.c
diff --git a/sysdeps/libm-ieee754/s_clog10f.c b/sysdeps/generic/s_clog10f.c
index bc4094b8ba..bc4094b8ba 100644
--- a/sysdeps/libm-ieee754/s_clog10f.c
+++ b/sysdeps/generic/s_clog10f.c
diff --git a/sysdeps/libm-ieee754/s_clog10l.c b/sysdeps/generic/s_clog10l.c
index 186eba25cd..186eba25cd 100644
--- a/sysdeps/libm-ieee754/s_clog10l.c
+++ b/sysdeps/generic/s_clog10l.c
diff --git a/sysdeps/libm-ieee754/s_clogf.c b/sysdeps/generic/s_clogf.c
index 9c9aa83e33..9c9aa83e33 100644
--- a/sysdeps/libm-ieee754/s_clogf.c
+++ b/sysdeps/generic/s_clogf.c
diff --git a/sysdeps/libm-ieee754/s_clogl.c b/sysdeps/generic/s_clogl.c
index a297ec9628..a297ec9628 100644
--- a/sysdeps/libm-ieee754/s_clogl.c
+++ b/sysdeps/generic/s_clogl.c
diff --git a/sysdeps/libm-ieee754/s_cpow.c b/sysdeps/generic/s_cpow.c
index 074b38bd2d..074b38bd2d 100644
--- a/sysdeps/libm-ieee754/s_cpow.c
+++ b/sysdeps/generic/s_cpow.c
diff --git a/sysdeps/libm-ieee754/s_cpowf.c b/sysdeps/generic/s_cpowf.c
index fa4541ca2b..fa4541ca2b 100644
--- a/sysdeps/libm-ieee754/s_cpowf.c
+++ b/sysdeps/generic/s_cpowf.c
diff --git a/sysdeps/libm-ieee754/s_cpowl.c b/sysdeps/generic/s_cpowl.c
index 69097d5dcc..69097d5dcc 100644
--- a/sysdeps/libm-ieee754/s_cpowl.c
+++ b/sysdeps/generic/s_cpowl.c
diff --git a/sysdeps/libm-ieee754/s_cproj.c b/sysdeps/generic/s_cproj.c
index fb50bb5a88..fb50bb5a88 100644
--- a/sysdeps/libm-ieee754/s_cproj.c
+++ b/sysdeps/generic/s_cproj.c
diff --git a/sysdeps/libm-ieee754/s_cprojf.c b/sysdeps/generic/s_cprojf.c
index b90590835c..b90590835c 100644
--- a/sysdeps/libm-ieee754/s_cprojf.c
+++ b/sysdeps/generic/s_cprojf.c
diff --git a/sysdeps/libm-ieee754/s_cprojl.c b/sysdeps/generic/s_cprojl.c
index 13da4b417d..13da4b417d 100644
--- a/sysdeps/libm-ieee754/s_cprojl.c
+++ b/sysdeps/generic/s_cprojl.c
diff --git a/sysdeps/libm-ieee754/s_csin.c b/sysdeps/generic/s_csin.c
index 6627387d42..6627387d42 100644
--- a/sysdeps/libm-ieee754/s_csin.c
+++ b/sysdeps/generic/s_csin.c
diff --git a/sysdeps/libm-ieee754/s_csinf.c b/sysdeps/generic/s_csinf.c
index 31d2f1fd54..31d2f1fd54 100644
--- a/sysdeps/libm-ieee754/s_csinf.c
+++ b/sysdeps/generic/s_csinf.c
diff --git a/sysdeps/libm-ieee754/s_csinh.c b/sysdeps/generic/s_csinh.c
index 29a271fec6..29a271fec6 100644
--- a/sysdeps/libm-ieee754/s_csinh.c
+++ b/sysdeps/generic/s_csinh.c
diff --git a/sysdeps/libm-ieee754/s_csinhf.c b/sysdeps/generic/s_csinhf.c
index 9c479bba95..9c479bba95 100644
--- a/sysdeps/libm-ieee754/s_csinhf.c
+++ b/sysdeps/generic/s_csinhf.c
diff --git a/sysdeps/libm-ieee754/s_csinhl.c b/sysdeps/generic/s_csinhl.c
index 471cc7e81e..471cc7e81e 100644
--- a/sysdeps/libm-ieee754/s_csinhl.c
+++ b/sysdeps/generic/s_csinhl.c
diff --git a/sysdeps/libm-ieee754/s_csinl.c b/sysdeps/generic/s_csinl.c
index bae8648c32..bae8648c32 100644
--- a/sysdeps/libm-ieee754/s_csinl.c
+++ b/sysdeps/generic/s_csinl.c
diff --git a/sysdeps/libm-ieee754/s_csqrt.c b/sysdeps/generic/s_csqrt.c
index a4dedf8806..a4dedf8806 100644
--- a/sysdeps/libm-ieee754/s_csqrt.c
+++ b/sysdeps/generic/s_csqrt.c
diff --git a/sysdeps/libm-ieee754/s_csqrtf.c b/sysdeps/generic/s_csqrtf.c
index 3bc979f6e2..3bc979f6e2 100644
--- a/sysdeps/libm-ieee754/s_csqrtf.c
+++ b/sysdeps/generic/s_csqrtf.c
diff --git a/sysdeps/libm-ieee754/s_csqrtl.c b/sysdeps/generic/s_csqrtl.c
index b806bc6785..b806bc6785 100644
--- a/sysdeps/libm-ieee754/s_csqrtl.c
+++ b/sysdeps/generic/s_csqrtl.c
diff --git a/sysdeps/libm-ieee754/s_ctan.c b/sysdeps/generic/s_ctan.c
index f1ce9688bb..f1ce9688bb 100644
--- a/sysdeps/libm-ieee754/s_ctan.c
+++ b/sysdeps/generic/s_ctan.c
diff --git a/sysdeps/libm-ieee754/s_ctanf.c b/sysdeps/generic/s_ctanf.c
index 750d3511b9..750d3511b9 100644
--- a/sysdeps/libm-ieee754/s_ctanf.c
+++ b/sysdeps/generic/s_ctanf.c
diff --git a/sysdeps/libm-ieee754/s_ctanh.c b/sysdeps/generic/s_ctanh.c
index d8825f35f9..d8825f35f9 100644
--- a/sysdeps/libm-ieee754/s_ctanh.c
+++ b/sysdeps/generic/s_ctanh.c
diff --git a/sysdeps/libm-ieee754/s_ctanhf.c b/sysdeps/generic/s_ctanhf.c
index fd66648d79..fd66648d79 100644
--- a/sysdeps/libm-ieee754/s_ctanhf.c
+++ b/sysdeps/generic/s_ctanhf.c
diff --git a/sysdeps/libm-ieee754/s_ctanhl.c b/sysdeps/generic/s_ctanhl.c
index 5ec06a6fa4..5ec06a6fa4 100644
--- a/sysdeps/libm-ieee754/s_ctanhl.c
+++ b/sysdeps/generic/s_ctanhl.c
diff --git a/sysdeps/libm-ieee754/s_ctanl.c b/sysdeps/generic/s_ctanl.c
index 31ab3b48a6..31ab3b48a6 100644
--- a/sysdeps/libm-ieee754/s_ctanl.c
+++ b/sysdeps/generic/s_ctanl.c
diff --git a/sysdeps/libm-ieee754/s_fdim.c b/sysdeps/generic/s_fdim.c
index b45c413cb8..b45c413cb8 100644
--- a/sysdeps/libm-ieee754/s_fdim.c
+++ b/sysdeps/generic/s_fdim.c
diff --git a/sysdeps/libm-ieee754/s_fdimf.c b/sysdeps/generic/s_fdimf.c
index a8d8192c0f..a8d8192c0f 100644
--- a/sysdeps/libm-ieee754/s_fdimf.c
+++ b/sysdeps/generic/s_fdimf.c
diff --git a/sysdeps/libm-ieee754/s_fdiml.c b/sysdeps/generic/s_fdiml.c
index c97a668f10..c97a668f10 100644
--- a/sysdeps/libm-ieee754/s_fdiml.c
+++ b/sysdeps/generic/s_fdiml.c
diff --git a/sysdeps/libm-ieee754/s_fma.c b/sysdeps/generic/s_fma.c
index 53974dc40c..53974dc40c 100644
--- a/sysdeps/libm-ieee754/s_fma.c
+++ b/sysdeps/generic/s_fma.c
diff --git a/sysdeps/libm-ieee754/s_fmaf.c b/sysdeps/generic/s_fmaf.c
index 44e5e15def..44e5e15def 100644
--- a/sysdeps/libm-ieee754/s_fmaf.c
+++ b/sysdeps/generic/s_fmaf.c
diff --git a/sysdeps/libm-ieee754/s_fmal.c b/sysdeps/generic/s_fmal.c
index f73751f4db..f73751f4db 100644
--- a/sysdeps/libm-ieee754/s_fmal.c
+++ b/sysdeps/generic/s_fmal.c
diff --git a/sysdeps/libm-ieee754/s_fmax.c b/sysdeps/generic/s_fmax.c
index bc6af7286c..bc6af7286c 100644
--- a/sysdeps/libm-ieee754/s_fmax.c
+++ b/sysdeps/generic/s_fmax.c
diff --git a/sysdeps/libm-ieee754/s_fmaxf.c b/sysdeps/generic/s_fmaxf.c
index e56193fe7b..e56193fe7b 100644
--- a/sysdeps/libm-ieee754/s_fmaxf.c
+++ b/sysdeps/generic/s_fmaxf.c
diff --git a/sysdeps/libm-ieee754/s_fmaxl.c b/sysdeps/generic/s_fmaxl.c
index 6e1c7152ed..6e1c7152ed 100644
--- a/sysdeps/libm-ieee754/s_fmaxl.c
+++ b/sysdeps/generic/s_fmaxl.c
diff --git a/sysdeps/libm-ieee754/s_fmin.c b/sysdeps/generic/s_fmin.c
index b79e6eca5a..b79e6eca5a 100644
--- a/sysdeps/libm-ieee754/s_fmin.c
+++ b/sysdeps/generic/s_fmin.c
diff --git a/sysdeps/libm-ieee754/s_fminf.c b/sysdeps/generic/s_fminf.c
index 72c656e1ac..72c656e1ac 100644
--- a/sysdeps/libm-ieee754/s_fminf.c
+++ b/sysdeps/generic/s_fminf.c
diff --git a/sysdeps/libm-ieee754/s_fminl.c b/sysdeps/generic/s_fminl.c
index 0f06194b77..0f06194b77 100644
--- a/sysdeps/libm-ieee754/s_fminl.c
+++ b/sysdeps/generic/s_fminl.c
diff --git a/sysdeps/libm-ieee754/s_ldexp.c b/sysdeps/generic/s_ldexp.c
index 12c336fad4..12c336fad4 100644
--- a/sysdeps/libm-ieee754/s_ldexp.c
+++ b/sysdeps/generic/s_ldexp.c
diff --git a/sysdeps/libm-ieee754/s_ldexpf.c b/sysdeps/generic/s_ldexpf.c
index 1ecbe8346b..1ecbe8346b 100644
--- a/sysdeps/libm-ieee754/s_ldexpf.c
+++ b/sysdeps/generic/s_ldexpf.c
diff --git a/sysdeps/libm-ieee754/s_ldexpl.c b/sysdeps/generic/s_ldexpl.c
index 123a6b3b58..123a6b3b58 100644
--- a/sysdeps/libm-ieee754/s_ldexpl.c
+++ b/sysdeps/generic/s_ldexpl.c
diff --git a/sysdeps/libm-ieee754/s_nan.c b/sysdeps/generic/s_nan.c
index ff3b26855f..ff3b26855f 100644
--- a/sysdeps/libm-ieee754/s_nan.c
+++ b/sysdeps/generic/s_nan.c
diff --git a/sysdeps/libm-ieee754/s_nanf.c b/sysdeps/generic/s_nanf.c
index b59040ac82..b59040ac82 100644
--- a/sysdeps/libm-ieee754/s_nanf.c
+++ b/sysdeps/generic/s_nanf.c
diff --git a/sysdeps/libm-ieee754/s_nanl.c b/sysdeps/generic/s_nanl.c
index bd42689b78..bd42689b78 100644
--- a/sysdeps/libm-ieee754/s_nanl.c
+++ b/sysdeps/generic/s_nanl.c
diff --git a/sysdeps/libm-ieee754/s_nextafter.c b/sysdeps/generic/s_nextafter.c
index b98a161cf2..8b81e563d9 100644
--- a/sysdeps/libm-ieee754/s_nextafter.c
+++ b/sysdeps/generic/s_nextafter.c
@@ -81,4 +81,6 @@ weak_alias (__nextafter, nextafter)
 #ifdef NO_LONG_DOUBLE
 strong_alias (__nextafter, __nextafterl)
 weak_alias (__nextafter, nextafterl)
+strong_alias (__nextafter, __nexttoward)
+weak_alias (__nextafter, nexttoward)
 #endif
diff --git a/sysdeps/generic/s_nexttowardf.c b/sysdeps/generic/s_nexttowardf.c
new file mode 100644
index 0000000000..f4cf18d06e
--- /dev/null
+++ b/sysdeps/generic/s_nexttowardf.c
@@ -0,0 +1,79 @@
+/* Single precision version of nexttoward.c.
+   Conversion to IEEE single float by Jakub Jelinek, jj@ultra.linux.cz. */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* IEEE functions
+ *	nexttowardf(x,y)
+ *	return the next machine floating-point number of x in the
+ *	direction toward y.
+ * This is for machines which use the same binary type for double and
+ * long double.
+ *   Special cases:
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+	float __nexttowardf(float x, long double y)
+#else
+	float __nexttowardf(x,y)
+	float x;
+	long double y;
+#endif
+{
+	int32_t hx,hy,ix,iy;
+	u_int32_t ly;
+
+	GET_FLOAT_WORD(hx,x);
+	EXTRACT_WORDS(hy,ly,y);
+	ix = hx&0x7fffffff;		/* |x| */
+	iy = hy&0x7fffffff;		/* |y| */
+
+	if(((ix>=0x7f800000) ||				    /* x is nan */
+	   ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0))     /* y is nan */
+	   return x+y;
+	if((long double) x==y) return y;	/* x=y, return y */
+	if(ix==0) {				/* x == 0 */
+	    float x2;
+	    SET_FLOAT_WORD(x,(u_int32_t)((hy>>32)&0x80000000)|1);/* return +-minsub*/
+	    x2 = x*x;
+	    if(x2==x) return x2; else return x; /* raise underflow flag */
+	}
+	if(hx>=0) {				/* x > 0 */
+	    if(hy<0||(ix>>23)>(iy>>20)-0x380
+	       || ((ix>>23)==(iy>>20)-0x380
+		   && (ix&0x7fffff)>((hy<<3)|(ly>>29))&0x7fffff))	/* x > y, x -= ulp */
+		hx -= 1;
+	    else				/* x < y, x += ulp */
+		hx += 1;
+	} else {				/* x < 0 */
+	    if(hy>=0||(ix>>23)>(iy>>20)-0x380
+	       || ((ix>>23)==(iy>>20)-0x380
+		   && (ix&0x7fffff)>((hy<<3)|(ly>>29))&0x7fffff))	/* x < y, x -= ulp */
+		hx -= 1;
+	    else				/* x > y, x += ulp */
+		hx += 1;
+	}
+	hy = hx&0x7f800000;
+	if(hy>=0x7f800000) return x+x;	/* overflow  */
+	if(hy<0x00800000) {		/* underflow */
+	    float x2 = x*x;
+	    if(x2!=x) {		/* raise underflow flag */
+		SET_FLOAT_WORD(x2,hx);
+		return x2;
+	    }
+	}
+	SET_FLOAT_WORD(x,hx);
+	return x;
+}
+weak_alias (__nexttowardf, nexttowardf)
diff --git a/sysdeps/libm-ieee754/s_nexttowardl.c b/sysdeps/generic/s_nexttowardl.c
index 73c3610fc1..73c3610fc1 100644
--- a/sysdeps/libm-ieee754/s_nexttowardl.c
+++ b/sysdeps/generic/s_nexttowardl.c
diff --git a/sysdeps/libm-ieee754/s_significand.c b/sysdeps/generic/s_significand.c
index 4ab078c473..4ab078c473 100644
--- a/sysdeps/libm-ieee754/s_significand.c
+++ b/sysdeps/generic/s_significand.c
diff --git a/sysdeps/libm-ieee754/s_significandf.c b/sysdeps/generic/s_significandf.c
index 2893a4e1b7..2893a4e1b7 100644
--- a/sysdeps/libm-ieee754/s_significandf.c
+++ b/sysdeps/generic/s_significandf.c
diff --git a/sysdeps/libm-ieee754/s_significandl.c b/sysdeps/generic/s_significandl.c
index 6339274b5a..d84e806fdc 100644
--- a/sysdeps/libm-ieee754/s_significandl.c
+++ b/sysdeps/generic/s_significandl.c
@@ -20,7 +20,7 @@ static char rcsid[] = "$NetBSD: $";
 
 /*
  * significandl(x) computes just
- * 	scalbl(x, (double) -ilogbl(x)),
+ * 	scalbl(x, (long double) -ilogbl(x)),
  * for exercising the fraction-part(F) IEEE 754-1985 test vector.
  */
 
@@ -34,6 +34,6 @@ static char rcsid[] = "$NetBSD: $";
 	long double x;
 #endif
 {
-	return __ieee754_scalbl(x,(double) -ilogbl(x));
+	return __ieee754_scalbl(x,(long double) -ilogbl(x));
 }
 weak_alias (__significandl, significandl)
diff --git a/sysdeps/generic/s_tanhl.c b/sysdeps/generic/s_tanhl.c
new file mode 100644
index 0000000000..bc9a2d7f48
--- /dev/null
+++ b/sysdeps/generic/s_tanhl.c
@@ -0,0 +1,15 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__tanhl(long double x)
+{
+  fputs ("__tanhl not implemented\n", stderr);
+  __set_errno (ENOSYS);
+  return 0.0;
+}
+
+weak_alias (__tanhl, tanhl)
+stub_warning (tanhl)
+#include <stub-tag.h>
diff --git a/sysdeps/generic/strtold.c b/sysdeps/generic/strtold.c
index f1bb2f1c0d..86b2f7f2f4 100644
--- a/sysdeps/generic/strtold.c
+++ b/sysdeps/generic/strtold.c
@@ -1,31 +1,23 @@
-#include <math.h>
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
 
-#ifndef __NO_LONG_DOUBLE_MATH
-/* The actual implementation for all floating point sizes is in strtod.c.
-   These macros tell it to produce the `long double' version, `strtold'.  */
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
 
-# define FLOAT		long double
-# define FLT		LDBL
-# ifdef USE_IN_EXTENDED_LOCALE_MODEL
-#  define STRTOF	__strtold_l
-# else
-#  define STRTOF	strtold
-# endif
-# define MPN2FLOAT	__mpn_construct_long_double
-# define FLOAT_HUGE_VAL	HUGE_VALL
-# define SET_MANTISSA(flt, mant) \
-  do { union ieee854_long_double u;					      \
-       u.d = (flt);							      \
-       if ((mant & 0x7fffffffffffffffULL) == 0)				      \
-	 mant = 0x4000000000000000ULL;					      \
-       u.ieee.mantissa0 = (((mant) >> 32) & 0x7fffffff) | 0x80000000;	      \
-       u.ieee.mantissa1 = (mant) & 0xffffffff;				      \
-       (flt) = u.d;							      \
-  } while (0)
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+#include <stdlib.h>
 
-# include "strtod.c"
-#else
-# include <stdlib.h>
 /* There is no `long double' type, use the `double' implementations.  */
 long double
 __strtold_internal (const char *nptr, char **endptr, int group)
diff --git a/sysdeps/generic/w_expl.c b/sysdeps/generic/w_expl.c
new file mode 100644
index 0000000000..70096a820c
--- /dev/null
+++ b/sysdeps/generic/w_expl.c
@@ -0,0 +1,13 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+long double
+__expl(long double x)
+{
+  fputs ("__expl not implemented\n", stderr);
+  __set_errno (ENOSYS);
+  return 0.0;
+}
+
+weak_alias (__expl, expl)
diff --git a/sysdeps/i386/Implies b/sysdeps/i386/Implies
index d6acf04a82..ac22f59f78 100644
--- a/sysdeps/i386/Implies
+++ b/sysdeps/i386/Implies
@@ -1,2 +1,4 @@
 wordsize-32
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
+ieee754/ldbl-96
diff --git a/sysdeps/i386/fpu/Implies b/sysdeps/i386/fpu/Implies
deleted file mode 100644
index de9b0b27aa..0000000000
--- a/sysdeps/i386/fpu/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-# For x86 machines with FPU, use the i387 port of libm by JT Conklin.
-libm-i387
diff --git a/sysdeps/libm-i387/e_acos.S b/sysdeps/i386/fpu/e_acos.S
index b9d07b1091..b9d07b1091 100644
--- a/sysdeps/libm-i387/e_acos.S
+++ b/sysdeps/i386/fpu/e_acos.S
diff --git a/sysdeps/libm-i387/e_acosf.S b/sysdeps/i386/fpu/e_acosf.S
index 50b13fd1bd..50b13fd1bd 100644
--- a/sysdeps/libm-i387/e_acosf.S
+++ b/sysdeps/i386/fpu/e_acosf.S
diff --git a/sysdeps/libm-i387/e_acosh.S b/sysdeps/i386/fpu/e_acosh.S
index a3397b365c..a3397b365c 100644
--- a/sysdeps/libm-i387/e_acosh.S
+++ b/sysdeps/i386/fpu/e_acosh.S
diff --git a/sysdeps/libm-i387/e_acoshf.S b/sysdeps/i386/fpu/e_acoshf.S
index 8aa78957e2..8aa78957e2 100644
--- a/sysdeps/libm-i387/e_acoshf.S
+++ b/sysdeps/i386/fpu/e_acoshf.S
diff --git a/sysdeps/libm-i387/e_acoshl.S b/sysdeps/i386/fpu/e_acoshl.S
index 0c81daaebe..0c81daaebe 100644
--- a/sysdeps/libm-i387/e_acoshl.S
+++ b/sysdeps/i386/fpu/e_acoshl.S
diff --git a/sysdeps/libm-i387/e_acosl.S b/sysdeps/i386/fpu/e_acosl.S
index d69f056556..d69f056556 100644
--- a/sysdeps/libm-i387/e_acosl.S
+++ b/sysdeps/i386/fpu/e_acosl.S
diff --git a/sysdeps/libm-i387/e_asin.S b/sysdeps/i386/fpu/e_asin.S
index 945e308245..945e308245 100644
--- a/sysdeps/libm-i387/e_asin.S
+++ b/sysdeps/i386/fpu/e_asin.S
diff --git a/sysdeps/libm-i387/e_asinf.S b/sysdeps/i386/fpu/e_asinf.S
index d450e9a740..d450e9a740 100644
--- a/sysdeps/libm-i387/e_asinf.S
+++ b/sysdeps/i386/fpu/e_asinf.S
diff --git a/sysdeps/libm-i387/e_asinl.S b/sysdeps/i386/fpu/e_asinl.S
index 3919fbcf58..3919fbcf58 100644
--- a/sysdeps/libm-i387/e_asinl.S
+++ b/sysdeps/i386/fpu/e_asinl.S
diff --git a/sysdeps/libm-i387/e_atan2.S b/sysdeps/i386/fpu/e_atan2.S
index 8df04e485e..8df04e485e 100644
--- a/sysdeps/libm-i387/e_atan2.S
+++ b/sysdeps/i386/fpu/e_atan2.S
diff --git a/sysdeps/libm-i387/e_atan2f.S b/sysdeps/i386/fpu/e_atan2f.S
index fc6621f183..fc6621f183 100644
--- a/sysdeps/libm-i387/e_atan2f.S
+++ b/sysdeps/i386/fpu/e_atan2f.S
diff --git a/sysdeps/libm-i387/e_atan2l.S b/sysdeps/i386/fpu/e_atan2l.S
index f58eaa94a9..f58eaa94a9 100644
--- a/sysdeps/libm-i387/e_atan2l.S
+++ b/sysdeps/i386/fpu/e_atan2l.S
diff --git a/sysdeps/libm-i387/e_atanh.S b/sysdeps/i386/fpu/e_atanh.S
index 231e96f57f..231e96f57f 100644
--- a/sysdeps/libm-i387/e_atanh.S
+++ b/sysdeps/i386/fpu/e_atanh.S
diff --git a/sysdeps/libm-i387/e_atanhf.S b/sysdeps/i386/fpu/e_atanhf.S
index 687d4c97fb..687d4c97fb 100644
--- a/sysdeps/libm-i387/e_atanhf.S
+++ b/sysdeps/i386/fpu/e_atanhf.S
diff --git a/sysdeps/libm-i387/e_atanhl.S b/sysdeps/i386/fpu/e_atanhl.S
index 8a2bd11ce4..8a2bd11ce4 100644
--- a/sysdeps/libm-i387/e_atanhl.S
+++ b/sysdeps/i386/fpu/e_atanhl.S
diff --git a/sysdeps/libm-i387/e_exp.S b/sysdeps/i386/fpu/e_exp.S
index 4a75fa1d1c..4a75fa1d1c 100644
--- a/sysdeps/libm-i387/e_exp.S
+++ b/sysdeps/i386/fpu/e_exp.S
diff --git a/sysdeps/libm-i387/e_exp10.S b/sysdeps/i386/fpu/e_exp10.S
index 6bfcdbb723..6bfcdbb723 100644
--- a/sysdeps/libm-i387/e_exp10.S
+++ b/sysdeps/i386/fpu/e_exp10.S
diff --git a/sysdeps/libm-i387/e_exp10f.S b/sysdeps/i386/fpu/e_exp10f.S
index 4791b99afa..4791b99afa 100644
--- a/sysdeps/libm-i387/e_exp10f.S
+++ b/sysdeps/i386/fpu/e_exp10f.S
diff --git a/sysdeps/libm-i387/e_exp10l.S b/sysdeps/i386/fpu/e_exp10l.S
index 71f0da792d..71f0da792d 100644
--- a/sysdeps/libm-i387/e_exp10l.S
+++ b/sysdeps/i386/fpu/e_exp10l.S
diff --git a/sysdeps/libm-i387/e_expf.S b/sysdeps/i386/fpu/e_expf.S
index 5fd49b89fd..5fd49b89fd 100644
--- a/sysdeps/libm-i387/e_expf.S
+++ b/sysdeps/i386/fpu/e_expf.S
diff --git a/sysdeps/libm-i387/e_expl.S b/sysdeps/i386/fpu/e_expl.S
index 2bcdf58c58..2bcdf58c58 100644
--- a/sysdeps/libm-i387/e_expl.S
+++ b/sysdeps/i386/fpu/e_expl.S
diff --git a/sysdeps/libm-i387/e_fmod.S b/sysdeps/i386/fpu/e_fmod.S
index 4cf6e92054..4cf6e92054 100644
--- a/sysdeps/libm-i387/e_fmod.S
+++ b/sysdeps/i386/fpu/e_fmod.S
diff --git a/sysdeps/libm-i387/e_fmodf.S b/sysdeps/i386/fpu/e_fmodf.S
index bbce40976d..bbce40976d 100644
--- a/sysdeps/libm-i387/e_fmodf.S
+++ b/sysdeps/i386/fpu/e_fmodf.S
diff --git a/sysdeps/libm-i387/e_fmodl.S b/sysdeps/i386/fpu/e_fmodl.S
index 7ae63a40ab..7ae63a40ab 100644
--- a/sysdeps/libm-i387/e_fmodl.S
+++ b/sysdeps/i386/fpu/e_fmodl.S
diff --git a/sysdeps/libm-i387/e_hypot.S b/sysdeps/i386/fpu/e_hypot.S
index 07a32878a0..07a32878a0 100644
--- a/sysdeps/libm-i387/e_hypot.S
+++ b/sysdeps/i386/fpu/e_hypot.S
diff --git a/sysdeps/libm-i387/e_hypotf.S b/sysdeps/i386/fpu/e_hypotf.S
index bf5416b664..bf5416b664 100644
--- a/sysdeps/libm-i387/e_hypotf.S
+++ b/sysdeps/i386/fpu/e_hypotf.S
diff --git a/sysdeps/libm-i387/e_log.S b/sysdeps/i386/fpu/e_log.S
index c7cacdfb0a..c7cacdfb0a 100644
--- a/sysdeps/libm-i387/e_log.S
+++ b/sysdeps/i386/fpu/e_log.S
diff --git a/sysdeps/libm-i387/e_log10.S b/sysdeps/i386/fpu/e_log10.S
index 2c8488c3a9..2c8488c3a9 100644
--- a/sysdeps/libm-i387/e_log10.S
+++ b/sysdeps/i386/fpu/e_log10.S
diff --git a/sysdeps/libm-i387/e_log10f.S b/sysdeps/i386/fpu/e_log10f.S
index 2c07161085..2c07161085 100644
--- a/sysdeps/libm-i387/e_log10f.S
+++ b/sysdeps/i386/fpu/e_log10f.S
diff --git a/sysdeps/libm-i387/e_log10l.S b/sysdeps/i386/fpu/e_log10l.S
index 6fe7c5a6f7..6fe7c5a6f7 100644
--- a/sysdeps/libm-i387/e_log10l.S
+++ b/sysdeps/i386/fpu/e_log10l.S
diff --git a/sysdeps/libm-i387/e_logf.S b/sysdeps/i386/fpu/e_logf.S
index bdba1d3225..bdba1d3225 100644
--- a/sysdeps/libm-i387/e_logf.S
+++ b/sysdeps/i386/fpu/e_logf.S
diff --git a/sysdeps/libm-i387/e_logl.S b/sysdeps/i386/fpu/e_logl.S
index bda3ea508e..bda3ea508e 100644
--- a/sysdeps/libm-i387/e_logl.S
+++ b/sysdeps/i386/fpu/e_logl.S
diff --git a/sysdeps/libm-i387/e_pow.S b/sysdeps/i386/fpu/e_pow.S
index 75ad211872..75ad211872 100644
--- a/sysdeps/libm-i387/e_pow.S
+++ b/sysdeps/i386/fpu/e_pow.S
diff --git a/sysdeps/libm-i387/e_powf.S b/sysdeps/i386/fpu/e_powf.S
index d7342bf56f..d7342bf56f 100644
--- a/sysdeps/libm-i387/e_powf.S
+++ b/sysdeps/i386/fpu/e_powf.S
diff --git a/sysdeps/libm-i387/e_powl.S b/sysdeps/i386/fpu/e_powl.S
index 2e09dcc820..2e09dcc820 100644
--- a/sysdeps/libm-i387/e_powl.S
+++ b/sysdeps/i386/fpu/e_powl.S
diff --git a/sysdeps/libm-i387/e_rem_pio2.c b/sysdeps/i386/fpu/e_rem_pio2.c
index 1347b0468c..1347b0468c 100644
--- a/sysdeps/libm-i387/e_rem_pio2.c
+++ b/sysdeps/i386/fpu/e_rem_pio2.c
diff --git a/sysdeps/libm-i387/e_rem_pio2f.c b/sysdeps/i386/fpu/e_rem_pio2f.c
index 1347b0468c..1347b0468c 100644
--- a/sysdeps/libm-i387/e_rem_pio2f.c
+++ b/sysdeps/i386/fpu/e_rem_pio2f.c
diff --git a/sysdeps/libm-i387/e_rem_pio2l.c b/sysdeps/i386/fpu/e_rem_pio2l.c
index 1347b0468c..1347b0468c 100644
--- a/sysdeps/libm-i387/e_rem_pio2l.c
+++ b/sysdeps/i386/fpu/e_rem_pio2l.c
diff --git a/sysdeps/libm-i387/e_remainder.S b/sysdeps/i386/fpu/e_remainder.S
index 2f43cb894c..2f43cb894c 100644
--- a/sysdeps/libm-i387/e_remainder.S
+++ b/sysdeps/i386/fpu/e_remainder.S
diff --git a/sysdeps/libm-i387/e_remainderf.S b/sysdeps/i386/fpu/e_remainderf.S
index 79f821993b..79f821993b 100644
--- a/sysdeps/libm-i387/e_remainderf.S
+++ b/sysdeps/i386/fpu/e_remainderf.S
diff --git a/sysdeps/libm-i387/e_remainderl.S b/sysdeps/i386/fpu/e_remainderl.S
index 5f50b626a2..5f50b626a2 100644
--- a/sysdeps/libm-i387/e_remainderl.S
+++ b/sysdeps/i386/fpu/e_remainderl.S
diff --git a/sysdeps/libm-i387/e_scalb.S b/sysdeps/i386/fpu/e_scalb.S
index 7ff5541e2f..7ff5541e2f 100644
--- a/sysdeps/libm-i387/e_scalb.S
+++ b/sysdeps/i386/fpu/e_scalb.S
diff --git a/sysdeps/libm-i387/e_scalbf.S b/sysdeps/i386/fpu/e_scalbf.S
index 4222eecc97..4222eecc97 100644
--- a/sysdeps/libm-i387/e_scalbf.S
+++ b/sysdeps/i386/fpu/e_scalbf.S
diff --git a/sysdeps/libm-i387/e_scalbl.S b/sysdeps/i386/fpu/e_scalbl.S
index 56cc833a56..56cc833a56 100644
--- a/sysdeps/libm-i387/e_scalbl.S
+++ b/sysdeps/i386/fpu/e_scalbl.S
diff --git a/sysdeps/libm-i387/e_sqrt.S b/sysdeps/i386/fpu/e_sqrt.S
index 6f253d51aa..6f253d51aa 100644
--- a/sysdeps/libm-i387/e_sqrt.S
+++ b/sysdeps/i386/fpu/e_sqrt.S
diff --git a/sysdeps/libm-i387/e_sqrtf.S b/sysdeps/i386/fpu/e_sqrtf.S
index 5ce1ad0544..5ce1ad0544 100644
--- a/sysdeps/libm-i387/e_sqrtf.S
+++ b/sysdeps/i386/fpu/e_sqrtf.S
diff --git a/sysdeps/libm-i387/e_sqrtl.S b/sysdeps/i386/fpu/e_sqrtl.S
index d47aae5cb5..d47aae5cb5 100644
--- a/sysdeps/libm-i387/e_sqrtl.S
+++ b/sysdeps/i386/fpu/e_sqrtl.S
diff --git a/sysdeps/libm-i387/k_rem_pio2.c b/sysdeps/i386/fpu/k_rem_pio2.c
index 1347b0468c..1347b0468c 100644
--- a/sysdeps/libm-i387/k_rem_pio2.c
+++ b/sysdeps/i386/fpu/k_rem_pio2.c
diff --git a/sysdeps/libm-i387/k_rem_pio2f.c b/sysdeps/i386/fpu/k_rem_pio2f.c
index 1347b0468c..1347b0468c 100644
--- a/sysdeps/libm-i387/k_rem_pio2f.c
+++ b/sysdeps/i386/fpu/k_rem_pio2f.c
diff --git a/sysdeps/libm-i387/k_rem_pio2l.c b/sysdeps/i386/fpu/k_rem_pio2l.c
index 1347b0468c..1347b0468c 100644
--- a/sysdeps/libm-i387/k_rem_pio2l.c
+++ b/sysdeps/i386/fpu/k_rem_pio2l.c
diff --git a/sysdeps/libm-i387/s_asinh.S b/sysdeps/i386/fpu/s_asinh.S
index a4c52cb67c..a4c52cb67c 100644
--- a/sysdeps/libm-i387/s_asinh.S
+++ b/sysdeps/i386/fpu/s_asinh.S
diff --git a/sysdeps/libm-i387/s_asinhf.S b/sysdeps/i386/fpu/s_asinhf.S
index a6925c7b4c..a6925c7b4c 100644
--- a/sysdeps/libm-i387/s_asinhf.S
+++ b/sysdeps/i386/fpu/s_asinhf.S
diff --git a/sysdeps/libm-i387/s_asinhl.S b/sysdeps/i386/fpu/s_asinhl.S
index 62e29bc58e..62e29bc58e 100644
--- a/sysdeps/libm-i387/s_asinhl.S
+++ b/sysdeps/i386/fpu/s_asinhl.S
diff --git a/sysdeps/libm-i387/s_atan.S b/sysdeps/i386/fpu/s_atan.S
index 7502f6d828..7502f6d828 100644
--- a/sysdeps/libm-i387/s_atan.S
+++ b/sysdeps/i386/fpu/s_atan.S
diff --git a/sysdeps/libm-i387/s_atanf.S b/sysdeps/i386/fpu/s_atanf.S
index 70232c8240..70232c8240 100644
--- a/sysdeps/libm-i387/s_atanf.S
+++ b/sysdeps/i386/fpu/s_atanf.S
diff --git a/sysdeps/libm-i387/s_atanl.S b/sysdeps/i386/fpu/s_atanl.S
index 8b07272764..8b07272764 100644
--- a/sysdeps/libm-i387/s_atanl.S
+++ b/sysdeps/i386/fpu/s_atanl.S
diff --git a/sysdeps/libm-i387/s_cbrt.S b/sysdeps/i386/fpu/s_cbrt.S
index 3f6a0174f2..3f6a0174f2 100644
--- a/sysdeps/libm-i387/s_cbrt.S
+++ b/sysdeps/i386/fpu/s_cbrt.S
diff --git a/sysdeps/libm-i387/s_cbrtf.S b/sysdeps/i386/fpu/s_cbrtf.S
index a14e04ed2f..a14e04ed2f 100644
--- a/sysdeps/libm-i387/s_cbrtf.S
+++ b/sysdeps/i386/fpu/s_cbrtf.S
diff --git a/sysdeps/libm-i387/s_cbrtl.S b/sysdeps/i386/fpu/s_cbrtl.S
index 6a3b9a8dc5..6a3b9a8dc5 100644
--- a/sysdeps/libm-i387/s_cbrtl.S
+++ b/sysdeps/i386/fpu/s_cbrtl.S
diff --git a/sysdeps/libm-i387/s_ceil.S b/sysdeps/i386/fpu/s_ceil.S
index b0159128aa..b0159128aa 100644
--- a/sysdeps/libm-i387/s_ceil.S
+++ b/sysdeps/i386/fpu/s_ceil.S
diff --git a/sysdeps/libm-i387/s_ceilf.S b/sysdeps/i386/fpu/s_ceilf.S
index 352d40d7ce..352d40d7ce 100644
--- a/sysdeps/libm-i387/s_ceilf.S
+++ b/sysdeps/i386/fpu/s_ceilf.S
diff --git a/sysdeps/libm-i387/s_ceill.S b/sysdeps/i386/fpu/s_ceill.S
index 0128966ebe..0128966ebe 100644
--- a/sysdeps/libm-i387/s_ceill.S
+++ b/sysdeps/i386/fpu/s_ceill.S
diff --git a/sysdeps/libm-i387/s_cexp.S b/sysdeps/i386/fpu/s_cexp.S
index 61158d9540..61158d9540 100644
--- a/sysdeps/libm-i387/s_cexp.S
+++ b/sysdeps/i386/fpu/s_cexp.S
diff --git a/sysdeps/libm-i387/s_cexpf.S b/sysdeps/i386/fpu/s_cexpf.S
index d6dcebcb23..d6dcebcb23 100644
--- a/sysdeps/libm-i387/s_cexpf.S
+++ b/sysdeps/i386/fpu/s_cexpf.S
diff --git a/sysdeps/libm-i387/s_cexpl.S b/sysdeps/i386/fpu/s_cexpl.S
index 203a7ee779..203a7ee779 100644
--- a/sysdeps/libm-i387/s_cexpl.S
+++ b/sysdeps/i386/fpu/s_cexpl.S
diff --git a/sysdeps/libm-i387/s_copysign.S b/sysdeps/i386/fpu/s_copysign.S
index 2520a94427..2520a94427 100644
--- a/sysdeps/libm-i387/s_copysign.S
+++ b/sysdeps/i386/fpu/s_copysign.S
diff --git a/sysdeps/libm-i387/s_copysignf.S b/sysdeps/i386/fpu/s_copysignf.S
index 57b1a6f119..57b1a6f119 100644
--- a/sysdeps/libm-i387/s_copysignf.S
+++ b/sysdeps/i386/fpu/s_copysignf.S
diff --git a/sysdeps/libm-i387/s_copysignl.S b/sysdeps/i386/fpu/s_copysignl.S
index 2163e7b014..2163e7b014 100644
--- a/sysdeps/libm-i387/s_copysignl.S
+++ b/sysdeps/i386/fpu/s_copysignl.S
diff --git a/sysdeps/libm-i387/s_cos.S b/sysdeps/i386/fpu/s_cos.S
index ac8b1459d9..ac8b1459d9 100644
--- a/sysdeps/libm-i387/s_cos.S
+++ b/sysdeps/i386/fpu/s_cos.S
diff --git a/sysdeps/libm-i387/s_cosf.S b/sysdeps/i386/fpu/s_cosf.S
index d8e8090639..d8e8090639 100644
--- a/sysdeps/libm-i387/s_cosf.S
+++ b/sysdeps/i386/fpu/s_cosf.S
diff --git a/sysdeps/libm-i387/s_cosl.S b/sysdeps/i386/fpu/s_cosl.S
index 61c9010c99..61c9010c99 100644
--- a/sysdeps/libm-i387/s_cosl.S
+++ b/sysdeps/i386/fpu/s_cosl.S
diff --git a/sysdeps/libm-i387/s_exp2.S b/sysdeps/i386/fpu/s_exp2.S
index 778c0c0eb6..778c0c0eb6 100644
--- a/sysdeps/libm-i387/s_exp2.S
+++ b/sysdeps/i386/fpu/s_exp2.S
diff --git a/sysdeps/libm-i387/s_exp2f.S b/sysdeps/i386/fpu/s_exp2f.S
index c2d1af1af1..c2d1af1af1 100644
--- a/sysdeps/libm-i387/s_exp2f.S
+++ b/sysdeps/i386/fpu/s_exp2f.S
diff --git a/sysdeps/libm-i387/s_exp2l.S b/sysdeps/i386/fpu/s_exp2l.S
index fa1fdc9236..fa1fdc9236 100644
--- a/sysdeps/libm-i387/s_exp2l.S
+++ b/sysdeps/i386/fpu/s_exp2l.S
diff --git a/sysdeps/libm-i387/s_expm1.S b/sysdeps/i386/fpu/s_expm1.S
index 92beaf0776..92beaf0776 100644
--- a/sysdeps/libm-i387/s_expm1.S
+++ b/sysdeps/i386/fpu/s_expm1.S
diff --git a/sysdeps/libm-i387/s_expm1f.S b/sysdeps/i386/fpu/s_expm1f.S
index 45a60fe010..45a60fe010 100644
--- a/sysdeps/libm-i387/s_expm1f.S
+++ b/sysdeps/i386/fpu/s_expm1f.S
diff --git a/sysdeps/libm-i387/s_expm1l.S b/sysdeps/i386/fpu/s_expm1l.S
index 13fa698cc7..13fa698cc7 100644
--- a/sysdeps/libm-i387/s_expm1l.S
+++ b/sysdeps/i386/fpu/s_expm1l.S
diff --git a/sysdeps/libm-i387/s_fdim.S b/sysdeps/i386/fpu/s_fdim.S
index 7a1e2ffa49..7a1e2ffa49 100644
--- a/sysdeps/libm-i387/s_fdim.S
+++ b/sysdeps/i386/fpu/s_fdim.S
diff --git a/sysdeps/libm-i387/s_fdimf.S b/sysdeps/i386/fpu/s_fdimf.S
index 7e58f6752b..7e58f6752b 100644
--- a/sysdeps/libm-i387/s_fdimf.S
+++ b/sysdeps/i386/fpu/s_fdimf.S
diff --git a/sysdeps/libm-i387/s_fdiml.S b/sysdeps/i386/fpu/s_fdiml.S
index 7a8c18a5d3..7a8c18a5d3 100644
--- a/sysdeps/libm-i387/s_fdiml.S
+++ b/sysdeps/i386/fpu/s_fdiml.S
diff --git a/sysdeps/libm-i387/s_finite.S b/sysdeps/i386/fpu/s_finite.S
index 63c766a950..63c766a950 100644
--- a/sysdeps/libm-i387/s_finite.S
+++ b/sysdeps/i386/fpu/s_finite.S
diff --git a/sysdeps/libm-i387/s_finitef.S b/sysdeps/i386/fpu/s_finitef.S
index dabb71a115..dabb71a115 100644
--- a/sysdeps/libm-i387/s_finitef.S
+++ b/sysdeps/i386/fpu/s_finitef.S
diff --git a/sysdeps/libm-i387/s_finitel.S b/sysdeps/i386/fpu/s_finitel.S
index acc5ad4cd0..acc5ad4cd0 100644
--- a/sysdeps/libm-i387/s_finitel.S
+++ b/sysdeps/i386/fpu/s_finitel.S
diff --git a/sysdeps/libm-i387/s_floor.S b/sysdeps/i386/fpu/s_floor.S
index 20a8660424..20a8660424 100644
--- a/sysdeps/libm-i387/s_floor.S
+++ b/sysdeps/i386/fpu/s_floor.S
diff --git a/sysdeps/libm-i387/s_floorf.S b/sysdeps/i386/fpu/s_floorf.S
index eca93a2aa3..eca93a2aa3 100644
--- a/sysdeps/libm-i387/s_floorf.S
+++ b/sysdeps/i386/fpu/s_floorf.S
diff --git a/sysdeps/libm-i387/s_floorl.S b/sysdeps/i386/fpu/s_floorl.S
index c2bf091d73..c2bf091d73 100644
--- a/sysdeps/libm-i387/s_floorl.S
+++ b/sysdeps/i386/fpu/s_floorl.S
diff --git a/sysdeps/libm-i387/s_fma.S b/sysdeps/i386/fpu/s_fma.S
index 2affafcbf5..2affafcbf5 100644
--- a/sysdeps/libm-i387/s_fma.S
+++ b/sysdeps/i386/fpu/s_fma.S
diff --git a/sysdeps/libm-i387/s_fmaf.S b/sysdeps/i386/fpu/s_fmaf.S
index 03c6cc0f9e..03c6cc0f9e 100644
--- a/sysdeps/libm-i387/s_fmaf.S
+++ b/sysdeps/i386/fpu/s_fmaf.S
diff --git a/sysdeps/libm-i387/s_fmal.S b/sysdeps/i386/fpu/s_fmal.S
index c15fca8dab..c15fca8dab 100644
--- a/sysdeps/libm-i387/s_fmal.S
+++ b/sysdeps/i386/fpu/s_fmal.S
diff --git a/sysdeps/libm-i387/s_fmax.S b/sysdeps/i386/fpu/s_fmax.S
index 3dbaa139ad..3dbaa139ad 100644
--- a/sysdeps/libm-i387/s_fmax.S
+++ b/sysdeps/i386/fpu/s_fmax.S
diff --git a/sysdeps/libm-i387/s_fmaxf.S b/sysdeps/i386/fpu/s_fmaxf.S
index 5dd94a43c4..5dd94a43c4 100644
--- a/sysdeps/libm-i387/s_fmaxf.S
+++ b/sysdeps/i386/fpu/s_fmaxf.S
diff --git a/sysdeps/libm-i387/s_fmaxl.S b/sysdeps/i386/fpu/s_fmaxl.S
index d833bd1985..d833bd1985 100644
--- a/sysdeps/libm-i387/s_fmaxl.S
+++ b/sysdeps/i386/fpu/s_fmaxl.S
diff --git a/sysdeps/libm-i387/s_fmin.S b/sysdeps/i386/fpu/s_fmin.S
index 1ac46c7d21..1ac46c7d21 100644
--- a/sysdeps/libm-i387/s_fmin.S
+++ b/sysdeps/i386/fpu/s_fmin.S
diff --git a/sysdeps/libm-i387/s_fminf.S b/sysdeps/i386/fpu/s_fminf.S
index 7dd346d2bc..7dd346d2bc 100644
--- a/sysdeps/libm-i387/s_fminf.S
+++ b/sysdeps/i386/fpu/s_fminf.S
diff --git a/sysdeps/libm-i387/s_fminl.S b/sysdeps/i386/fpu/s_fminl.S
index 883735d32c..883735d32c 100644
--- a/sysdeps/libm-i387/s_fminl.S
+++ b/sysdeps/i386/fpu/s_fminl.S
diff --git a/sysdeps/libm-i387/s_frexp.S b/sysdeps/i386/fpu/s_frexp.S
index 6a05f26720..6a05f26720 100644
--- a/sysdeps/libm-i387/s_frexp.S
+++ b/sysdeps/i386/fpu/s_frexp.S
diff --git a/sysdeps/libm-i387/s_frexpf.S b/sysdeps/i386/fpu/s_frexpf.S
index 1021b97aee..1021b97aee 100644
--- a/sysdeps/libm-i387/s_frexpf.S
+++ b/sysdeps/i386/fpu/s_frexpf.S
diff --git a/sysdeps/libm-i387/s_frexpl.S b/sysdeps/i386/fpu/s_frexpl.S
index e3019ced6d..e3019ced6d 100644
--- a/sysdeps/libm-i387/s_frexpl.S
+++ b/sysdeps/i386/fpu/s_frexpl.S
diff --git a/sysdeps/libm-i387/s_ilogb.S b/sysdeps/i386/fpu/s_ilogb.S
index 36fb000c02..36fb000c02 100644
--- a/sysdeps/libm-i387/s_ilogb.S
+++ b/sysdeps/i386/fpu/s_ilogb.S
diff --git a/sysdeps/libm-i387/s_ilogbf.S b/sysdeps/i386/fpu/s_ilogbf.S
index 54f9d4647e..54f9d4647e 100644
--- a/sysdeps/libm-i387/s_ilogbf.S
+++ b/sysdeps/i386/fpu/s_ilogbf.S
diff --git a/sysdeps/libm-i387/s_ilogbl.S b/sysdeps/i386/fpu/s_ilogbl.S
index 1dad93abeb..1dad93abeb 100644
--- a/sysdeps/libm-i387/s_ilogbl.S
+++ b/sysdeps/i386/fpu/s_ilogbl.S
diff --git a/sysdeps/libm-i387/s_isinfl.c b/sysdeps/i386/fpu/s_isinfl.c
index f07898fd1b..f07898fd1b 100644
--- a/sysdeps/libm-i387/s_isinfl.c
+++ b/sysdeps/i386/fpu/s_isinfl.c
diff --git a/sysdeps/libm-i387/s_isnanl.c b/sysdeps/i386/fpu/s_isnanl.c
index 6a74b956cc..6a74b956cc 100644
--- a/sysdeps/libm-i387/s_isnanl.c
+++ b/sysdeps/i386/fpu/s_isnanl.c
diff --git a/sysdeps/libm-i387/s_llrint.S b/sysdeps/i386/fpu/s_llrint.S
index 6109ec45c3..6109ec45c3 100644
--- a/sysdeps/libm-i387/s_llrint.S
+++ b/sysdeps/i386/fpu/s_llrint.S
diff --git a/sysdeps/libm-i387/s_llrintf.S b/sysdeps/i386/fpu/s_llrintf.S
index c1e1c225c0..c1e1c225c0 100644
--- a/sysdeps/libm-i387/s_llrintf.S
+++ b/sysdeps/i386/fpu/s_llrintf.S
diff --git a/sysdeps/libm-i387/s_llrintl.S b/sysdeps/i386/fpu/s_llrintl.S
index d894897d5e..d894897d5e 100644
--- a/sysdeps/libm-i387/s_llrintl.S
+++ b/sysdeps/i386/fpu/s_llrintl.S
diff --git a/sysdeps/libm-i387/s_log1p.S b/sysdeps/i386/fpu/s_log1p.S
index 10e8a36369..10e8a36369 100644
--- a/sysdeps/libm-i387/s_log1p.S
+++ b/sysdeps/i386/fpu/s_log1p.S
diff --git a/sysdeps/libm-i387/s_log1pf.S b/sysdeps/i386/fpu/s_log1pf.S
index df9fdcbcfc..df9fdcbcfc 100644
--- a/sysdeps/libm-i387/s_log1pf.S
+++ b/sysdeps/i386/fpu/s_log1pf.S
diff --git a/sysdeps/libm-i387/s_log1pl.S b/sysdeps/i386/fpu/s_log1pl.S
index 05a17b2831..05a17b2831 100644
--- a/sysdeps/libm-i387/s_log1pl.S
+++ b/sysdeps/i386/fpu/s_log1pl.S
diff --git a/sysdeps/libm-i387/s_log2.S b/sysdeps/i386/fpu/s_log2.S
index 4632c96f67..4632c96f67 100644
--- a/sysdeps/libm-i387/s_log2.S
+++ b/sysdeps/i386/fpu/s_log2.S
diff --git a/sysdeps/libm-i387/s_log2f.S b/sysdeps/i386/fpu/s_log2f.S
index bfdd0ef88e..bfdd0ef88e 100644
--- a/sysdeps/libm-i387/s_log2f.S
+++ b/sysdeps/i386/fpu/s_log2f.S
diff --git a/sysdeps/libm-i387/s_log2l.S b/sysdeps/i386/fpu/s_log2l.S
index 184981c4bb..184981c4bb 100644
--- a/sysdeps/libm-i387/s_log2l.S
+++ b/sysdeps/i386/fpu/s_log2l.S
diff --git a/sysdeps/libm-i387/s_logb.S b/sysdeps/i386/fpu/s_logb.S
index f78c091c8a..f78c091c8a 100644
--- a/sysdeps/libm-i387/s_logb.S
+++ b/sysdeps/i386/fpu/s_logb.S
diff --git a/sysdeps/libm-i387/s_logbf.S b/sysdeps/i386/fpu/s_logbf.S
index 91eb3d2925..91eb3d2925 100644
--- a/sysdeps/libm-i387/s_logbf.S
+++ b/sysdeps/i386/fpu/s_logbf.S
diff --git a/sysdeps/libm-i387/s_logbl.S b/sysdeps/i386/fpu/s_logbl.S
index 5c9a9c1c9d..5c9a9c1c9d 100644
--- a/sysdeps/libm-i387/s_logbl.S
+++ b/sysdeps/i386/fpu/s_logbl.S
diff --git a/sysdeps/libm-i387/s_lrint.S b/sysdeps/i386/fpu/s_lrint.S
index 40956ab0d0..40956ab0d0 100644
--- a/sysdeps/libm-i387/s_lrint.S
+++ b/sysdeps/i386/fpu/s_lrint.S
diff --git a/sysdeps/libm-i387/s_lrintf.S b/sysdeps/i386/fpu/s_lrintf.S
index 2f49bdbabe..2f49bdbabe 100644
--- a/sysdeps/libm-i387/s_lrintf.S
+++ b/sysdeps/i386/fpu/s_lrintf.S
diff --git a/sysdeps/libm-i387/s_lrintl.S b/sysdeps/i386/fpu/s_lrintl.S
index 3a06c91b29..3a06c91b29 100644
--- a/sysdeps/libm-i387/s_lrintl.S
+++ b/sysdeps/i386/fpu/s_lrintl.S
diff --git a/sysdeps/libm-i387/s_nearbyint.S b/sysdeps/i386/fpu/s_nearbyint.S
index 65ce4f76a1..65ce4f76a1 100644
--- a/sysdeps/libm-i387/s_nearbyint.S
+++ b/sysdeps/i386/fpu/s_nearbyint.S
diff --git a/sysdeps/libm-i387/s_nearbyintf.S b/sysdeps/i386/fpu/s_nearbyintf.S
index 090c631607..090c631607 100644
--- a/sysdeps/libm-i387/s_nearbyintf.S
+++ b/sysdeps/i386/fpu/s_nearbyintf.S
diff --git a/sysdeps/libm-i387/s_nearbyintl.S b/sysdeps/i386/fpu/s_nearbyintl.S
index 2f60af8f18..2f60af8f18 100644
--- a/sysdeps/libm-i387/s_nearbyintl.S
+++ b/sysdeps/i386/fpu/s_nearbyintl.S
diff --git a/sysdeps/libm-i387/s_nextafterl.c b/sysdeps/i386/fpu/s_nextafterl.c
index 4596c6b93c..4596c6b93c 100644
--- a/sysdeps/libm-i387/s_nextafterl.c
+++ b/sysdeps/i386/fpu/s_nextafterl.c
diff --git a/sysdeps/libm-i387/s_remquo.S b/sysdeps/i386/fpu/s_remquo.S
index 8ada191771..8ada191771 100644
--- a/sysdeps/libm-i387/s_remquo.S
+++ b/sysdeps/i386/fpu/s_remquo.S
diff --git a/sysdeps/libm-i387/s_remquof.S b/sysdeps/i386/fpu/s_remquof.S
index f60aec9c46..f60aec9c46 100644
--- a/sysdeps/libm-i387/s_remquof.S
+++ b/sysdeps/i386/fpu/s_remquof.S
diff --git a/sysdeps/libm-i387/s_remquol.S b/sysdeps/i386/fpu/s_remquol.S
index 115d6e874b..115d6e874b 100644
--- a/sysdeps/libm-i387/s_remquol.S
+++ b/sysdeps/i386/fpu/s_remquol.S
diff --git a/sysdeps/libm-i387/s_rint.S b/sysdeps/i386/fpu/s_rint.S
index be36c5f0ca..be36c5f0ca 100644
--- a/sysdeps/libm-i387/s_rint.S
+++ b/sysdeps/i386/fpu/s_rint.S
diff --git a/sysdeps/libm-i387/s_rintf.S b/sysdeps/i386/fpu/s_rintf.S
index 2b358c1cf1..2b358c1cf1 100644
--- a/sysdeps/libm-i387/s_rintf.S
+++ b/sysdeps/i386/fpu/s_rintf.S
diff --git a/sysdeps/libm-i387/s_rintl.S b/sysdeps/i386/fpu/s_rintl.S
index fd1ae6324e..fd1ae6324e 100644
--- a/sysdeps/libm-i387/s_rintl.S
+++ b/sysdeps/i386/fpu/s_rintl.S
diff --git a/sysdeps/libm-i387/s_scalbln.c b/sysdeps/i386/fpu/s_scalbln.c
index 1009713fbc..1009713fbc 100644
--- a/sysdeps/libm-i387/s_scalbln.c
+++ b/sysdeps/i386/fpu/s_scalbln.c
diff --git a/sysdeps/libm-i387/s_scalblnf.c b/sysdeps/i386/fpu/s_scalblnf.c
index 5e558c3540..5e558c3540 100644
--- a/sysdeps/libm-i387/s_scalblnf.c
+++ b/sysdeps/i386/fpu/s_scalblnf.c
diff --git a/sysdeps/libm-i387/s_scalblnl.c b/sysdeps/i386/fpu/s_scalblnl.c
index cda2ec11c8..cda2ec11c8 100644
--- a/sysdeps/libm-i387/s_scalblnl.c
+++ b/sysdeps/i386/fpu/s_scalblnl.c
diff --git a/sysdeps/libm-i387/s_scalbn.S b/sysdeps/i386/fpu/s_scalbn.S
index ea9e25f094..ea9e25f094 100644
--- a/sysdeps/libm-i387/s_scalbn.S
+++ b/sysdeps/i386/fpu/s_scalbn.S
diff --git a/sysdeps/libm-i387/s_scalbnf.S b/sysdeps/i386/fpu/s_scalbnf.S
index dc8cfb4296..dc8cfb4296 100644
--- a/sysdeps/libm-i387/s_scalbnf.S
+++ b/sysdeps/i386/fpu/s_scalbnf.S
diff --git a/sysdeps/libm-i387/s_scalbnl.S b/sysdeps/i386/fpu/s_scalbnl.S
index 295494b3d2..295494b3d2 100644
--- a/sysdeps/libm-i387/s_scalbnl.S
+++ b/sysdeps/i386/fpu/s_scalbnl.S
diff --git a/sysdeps/libm-i387/s_significand.S b/sysdeps/i386/fpu/s_significand.S
index 4859b7ed71..4859b7ed71 100644
--- a/sysdeps/libm-i387/s_significand.S
+++ b/sysdeps/i386/fpu/s_significand.S
diff --git a/sysdeps/libm-i387/s_significandf.S b/sysdeps/i386/fpu/s_significandf.S
index 3a2de97759..3a2de97759 100644
--- a/sysdeps/libm-i387/s_significandf.S
+++ b/sysdeps/i386/fpu/s_significandf.S
diff --git a/sysdeps/libm-i387/s_significandl.S b/sysdeps/i386/fpu/s_significandl.S
index e3a69cba73..e3a69cba73 100644
--- a/sysdeps/libm-i387/s_significandl.S
+++ b/sysdeps/i386/fpu/s_significandl.S
diff --git a/sysdeps/libm-i387/s_sin.S b/sysdeps/i386/fpu/s_sin.S
index eb22d7e98b..eb22d7e98b 100644
--- a/sysdeps/libm-i387/s_sin.S
+++ b/sysdeps/i386/fpu/s_sin.S
diff --git a/sysdeps/libm-i387/s_sincos.S b/sysdeps/i386/fpu/s_sincos.S
index fe99f42d18..fe99f42d18 100644
--- a/sysdeps/libm-i387/s_sincos.S
+++ b/sysdeps/i386/fpu/s_sincos.S
diff --git a/sysdeps/libm-i387/s_sincosf.S b/sysdeps/i386/fpu/s_sincosf.S
index 5bb13f3c33..5bb13f3c33 100644
--- a/sysdeps/libm-i387/s_sincosf.S
+++ b/sysdeps/i386/fpu/s_sincosf.S
diff --git a/sysdeps/libm-i387/s_sincosl.S b/sysdeps/i386/fpu/s_sincosl.S
index 8b6694f09f..8b6694f09f 100644
--- a/sysdeps/libm-i387/s_sincosl.S
+++ b/sysdeps/i386/fpu/s_sincosl.S
diff --git a/sysdeps/libm-i387/s_sinf.S b/sysdeps/i386/fpu/s_sinf.S
index a010d60f5e..a010d60f5e 100644
--- a/sysdeps/libm-i387/s_sinf.S
+++ b/sysdeps/i386/fpu/s_sinf.S
diff --git a/sysdeps/libm-i387/s_sinl.S b/sysdeps/i386/fpu/s_sinl.S
index 3e215de5e1..3e215de5e1 100644
--- a/sysdeps/libm-i387/s_sinl.S
+++ b/sysdeps/i386/fpu/s_sinl.S
diff --git a/sysdeps/libm-i387/s_tan.S b/sysdeps/i386/fpu/s_tan.S
index 7b3547af4c..7b3547af4c 100644
--- a/sysdeps/libm-i387/s_tan.S
+++ b/sysdeps/i386/fpu/s_tan.S
diff --git a/sysdeps/libm-i387/s_tanf.S b/sysdeps/i386/fpu/s_tanf.S
index 7a7509119b..7a7509119b 100644
--- a/sysdeps/libm-i387/s_tanf.S
+++ b/sysdeps/i386/fpu/s_tanf.S
diff --git a/sysdeps/libm-i387/s_tanl.S b/sysdeps/i386/fpu/s_tanl.S
index f2bdd6a605..f2bdd6a605 100644
--- a/sysdeps/libm-i387/s_tanl.S
+++ b/sysdeps/i386/fpu/s_tanl.S
diff --git a/sysdeps/libm-i387/s_trunc.S b/sysdeps/i386/fpu/s_trunc.S
index 3100d716a9..3100d716a9 100644
--- a/sysdeps/libm-i387/s_trunc.S
+++ b/sysdeps/i386/fpu/s_trunc.S
diff --git a/sysdeps/libm-i387/s_truncf.S b/sysdeps/i386/fpu/s_truncf.S
index 275e5f714c..275e5f714c 100644
--- a/sysdeps/libm-i387/s_truncf.S
+++ b/sysdeps/i386/fpu/s_truncf.S
diff --git a/sysdeps/libm-i387/s_truncl.S b/sysdeps/i386/fpu/s_truncl.S
index 4c0bb0ce53..4c0bb0ce53 100644
--- a/sysdeps/libm-i387/s_truncl.S
+++ b/sysdeps/i386/fpu/s_truncl.S
diff --git a/sysdeps/libm-i387/t_exp.c b/sysdeps/i386/fpu/t_exp.c
index fd37963b05..fd37963b05 100644
--- a/sysdeps/libm-i387/t_exp.c
+++ b/sysdeps/i386/fpu/t_exp.c
diff --git a/sysdeps/i386/i686/Implies b/sysdeps/i386/i686/Implies
index 5e3b4cb5e7..b5c05ec7f2 100644
--- a/sysdeps/i386/i686/Implies
+++ b/sysdeps/i386/i686/Implies
@@ -2,4 +2,3 @@
 # not really good to use heavily i586 optimized code on a i686.  It's
 # better to use i486/i386 code.
 i386/i486
-libm-i387/i686
diff --git a/sysdeps/libm-i387/i686/s_fdim.S b/sysdeps/i386/i686/fpu/s_fdim.S
index 6f722c5b07..6f722c5b07 100644
--- a/sysdeps/libm-i387/i686/s_fdim.S
+++ b/sysdeps/i386/i686/fpu/s_fdim.S
diff --git a/sysdeps/libm-i387/i686/s_fdimf.S b/sysdeps/i386/i686/fpu/s_fdimf.S
index 1bcaf0012e..1bcaf0012e 100644
--- a/sysdeps/libm-i387/i686/s_fdimf.S
+++ b/sysdeps/i386/i686/fpu/s_fdimf.S
diff --git a/sysdeps/libm-i387/i686/s_fdiml.S b/sysdeps/i386/i686/fpu/s_fdiml.S
index 9e909ba60e..9e909ba60e 100644
--- a/sysdeps/libm-i387/i686/s_fdiml.S
+++ b/sysdeps/i386/i686/fpu/s_fdiml.S
diff --git a/sysdeps/libm-i387/i686/s_fmax.S b/sysdeps/i386/i686/fpu/s_fmax.S
index 3639ba7470..3639ba7470 100644
--- a/sysdeps/libm-i387/i686/s_fmax.S
+++ b/sysdeps/i386/i686/fpu/s_fmax.S
diff --git a/sysdeps/libm-i387/i686/s_fmaxf.S b/sysdeps/i386/i686/fpu/s_fmaxf.S
index ad948d0b62..ad948d0b62 100644
--- a/sysdeps/libm-i387/i686/s_fmaxf.S
+++ b/sysdeps/i386/i686/fpu/s_fmaxf.S
diff --git a/sysdeps/libm-i387/i686/s_fmaxl.S b/sysdeps/i386/i686/fpu/s_fmaxl.S
index 14859b0a6d..14859b0a6d 100644
--- a/sysdeps/libm-i387/i686/s_fmaxl.S
+++ b/sysdeps/i386/i686/fpu/s_fmaxl.S
diff --git a/sysdeps/libm-i387/i686/s_fmin.S b/sysdeps/i386/i686/fpu/s_fmin.S
index 383e9579f6..383e9579f6 100644
--- a/sysdeps/libm-i387/i686/s_fmin.S
+++ b/sysdeps/i386/i686/fpu/s_fmin.S
diff --git a/sysdeps/libm-i387/i686/s_fminf.S b/sysdeps/i386/i686/fpu/s_fminf.S
index f3dae00377..f3dae00377 100644
--- a/sysdeps/libm-i387/i686/s_fminf.S
+++ b/sysdeps/i386/i686/fpu/s_fminf.S
diff --git a/sysdeps/libm-i387/i686/s_fminl.S b/sysdeps/i386/i686/fpu/s_fminl.S
index f125531112..f125531112 100644
--- a/sysdeps/libm-i387/i686/s_fminl.S
+++ b/sysdeps/i386/i686/fpu/s_fminl.S
diff --git a/sysdeps/i960/Implies b/sysdeps/i960/Implies
index f8c4079ab5..1d569744ab 100644
--- a/sysdeps/i960/Implies
+++ b/sysdeps/i960/Implies
@@ -1,2 +1,3 @@
 # i960 family uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/ieee754/Implies b/sysdeps/ieee754/Implies
deleted file mode 100644
index 5c9e98b7ae..0000000000
--- a/sysdeps/ieee754/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-# For all IEEE machines, use Sun's fdlibm code.
-libm-ieee754
diff --git a/sysdeps/ieee754/dbl-64/Dist b/sysdeps/ieee754/dbl-64/Dist
new file mode 100644
index 0000000000..1bb7be3537
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/Dist
@@ -0,0 +1 @@
+t_exp2.h
diff --git a/sysdeps/ieee754/dbl2mpn.c b/sysdeps/ieee754/dbl-64/dbl2mpn.c
index f7dead4936..f7dead4936 100644
--- a/sysdeps/ieee754/dbl2mpn.c
+++ b/sysdeps/ieee754/dbl-64/dbl2mpn.c
diff --git a/sysdeps/libm-ieee754/e_acos.c b/sysdeps/ieee754/dbl-64/e_acos.c
index eb4080a8b8..eb4080a8b8 100644
--- a/sysdeps/libm-ieee754/e_acos.c
+++ b/sysdeps/ieee754/dbl-64/e_acos.c
diff --git a/sysdeps/libm-ieee754/e_acosh.c b/sysdeps/ieee754/dbl-64/e_acosh.c
index 27c29cd8c9..27c29cd8c9 100644
--- a/sysdeps/libm-ieee754/e_acosh.c
+++ b/sysdeps/ieee754/dbl-64/e_acosh.c
diff --git a/sysdeps/libm-ieee754/e_asin.c b/sysdeps/ieee754/dbl-64/e_asin.c
index aa19598848..aa19598848 100644
--- a/sysdeps/libm-ieee754/e_asin.c
+++ b/sysdeps/ieee754/dbl-64/e_asin.c
diff --git a/sysdeps/libm-ieee754/e_atan2.c b/sysdeps/ieee754/dbl-64/e_atan2.c
index ae7d759a9f..ae7d759a9f 100644
--- a/sysdeps/libm-ieee754/e_atan2.c
+++ b/sysdeps/ieee754/dbl-64/e_atan2.c
diff --git a/sysdeps/libm-ieee754/e_atanh.c b/sysdeps/ieee754/dbl-64/e_atanh.c
index fa4fe675c9..fa4fe675c9 100644
--- a/sysdeps/libm-ieee754/e_atanh.c
+++ b/sysdeps/ieee754/dbl-64/e_atanh.c
diff --git a/sysdeps/libm-ieee754/e_cosh.c b/sysdeps/ieee754/dbl-64/e_cosh.c
index 65106b9989..65106b9989 100644
--- a/sysdeps/libm-ieee754/e_cosh.c
+++ b/sysdeps/ieee754/dbl-64/e_cosh.c
diff --git a/sysdeps/libm-ieee754/e_exp.c b/sysdeps/ieee754/dbl-64/e_exp.c
index ee0b22f6ae..ee0b22f6ae 100644
--- a/sysdeps/libm-ieee754/e_exp.c
+++ b/sysdeps/ieee754/dbl-64/e_exp.c
diff --git a/sysdeps/libm-ieee754/e_fmod.c b/sysdeps/ieee754/dbl-64/e_fmod.c
index 2ce613574a..2ce613574a 100644
--- a/sysdeps/libm-ieee754/e_fmod.c
+++ b/sysdeps/ieee754/dbl-64/e_fmod.c
diff --git a/sysdeps/libm-ieee754/e_gamma_r.c b/sysdeps/ieee754/dbl-64/e_gamma_r.c
index bd802c24f1..bd802c24f1 100644
--- a/sysdeps/libm-ieee754/e_gamma_r.c
+++ b/sysdeps/ieee754/dbl-64/e_gamma_r.c
diff --git a/sysdeps/libm-ieee754/e_hypot.c b/sysdeps/ieee754/dbl-64/e_hypot.c
index 76a77ec33a..76a77ec33a 100644
--- a/sysdeps/libm-ieee754/e_hypot.c
+++ b/sysdeps/ieee754/dbl-64/e_hypot.c
diff --git a/sysdeps/libm-ieee754/e_j0.c b/sysdeps/ieee754/dbl-64/e_j0.c
index 55e8294bb9..55e8294bb9 100644
--- a/sysdeps/libm-ieee754/e_j0.c
+++ b/sysdeps/ieee754/dbl-64/e_j0.c
diff --git a/sysdeps/libm-ieee754/e_j1.c b/sysdeps/ieee754/dbl-64/e_j1.c
index daf025fdb7..daf025fdb7 100644
--- a/sysdeps/libm-ieee754/e_j1.c
+++ b/sysdeps/ieee754/dbl-64/e_j1.c
diff --git a/sysdeps/libm-ieee754/e_jn.c b/sysdeps/ieee754/dbl-64/e_jn.c
index d63d7688a3..d63d7688a3 100644
--- a/sysdeps/libm-ieee754/e_jn.c
+++ b/sysdeps/ieee754/dbl-64/e_jn.c
diff --git a/sysdeps/libm-ieee754/e_lgamma_r.c b/sysdeps/ieee754/dbl-64/e_lgamma_r.c
index 92e9556568..92e9556568 100644
--- a/sysdeps/libm-ieee754/e_lgamma_r.c
+++ b/sysdeps/ieee754/dbl-64/e_lgamma_r.c
diff --git a/sysdeps/libm-ieee754/e_log.c b/sysdeps/ieee754/dbl-64/e_log.c
index 851bd30198..851bd30198 100644
--- a/sysdeps/libm-ieee754/e_log.c
+++ b/sysdeps/ieee754/dbl-64/e_log.c
diff --git a/sysdeps/libm-ieee754/e_log10.c b/sysdeps/ieee754/dbl-64/e_log10.c
index e8a3278eaf..e8a3278eaf 100644
--- a/sysdeps/libm-ieee754/e_log10.c
+++ b/sysdeps/ieee754/dbl-64/e_log10.c
diff --git a/sysdeps/libm-ieee754/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c
index 1e1496f00d..1e1496f00d 100644
--- a/sysdeps/libm-ieee754/e_pow.c
+++ b/sysdeps/ieee754/dbl-64/e_pow.c
diff --git a/sysdeps/libm-ieee754/e_rem_pio2.c b/sysdeps/ieee754/dbl-64/e_rem_pio2.c
index a8a8cdb2b2..a8a8cdb2b2 100644
--- a/sysdeps/libm-ieee754/e_rem_pio2.c
+++ b/sysdeps/ieee754/dbl-64/e_rem_pio2.c
diff --git a/sysdeps/libm-ieee754/e_remainder.c b/sysdeps/ieee754/dbl-64/e_remainder.c
index 6418081182..6418081182 100644
--- a/sysdeps/libm-ieee754/e_remainder.c
+++ b/sysdeps/ieee754/dbl-64/e_remainder.c
diff --git a/sysdeps/libm-ieee754/e_sinh.c b/sysdeps/ieee754/dbl-64/e_sinh.c
index 1701b9bb67..1701b9bb67 100644
--- a/sysdeps/libm-ieee754/e_sinh.c
+++ b/sysdeps/ieee754/dbl-64/e_sinh.c
diff --git a/sysdeps/libm-ieee754/e_sqrt.c b/sysdeps/ieee754/dbl-64/e_sqrt.c
index 67da5455f9..67da5455f9 100644
--- a/sysdeps/libm-ieee754/e_sqrt.c
+++ b/sysdeps/ieee754/dbl-64/e_sqrt.c
diff --git a/sysdeps/libm-ieee754/k_cos.c b/sysdeps/ieee754/dbl-64/k_cos.c
index 7e38ef7915..7e38ef7915 100644
--- a/sysdeps/libm-ieee754/k_cos.c
+++ b/sysdeps/ieee754/dbl-64/k_cos.c
diff --git a/sysdeps/libm-ieee754/k_rem_pio2.c b/sysdeps/ieee754/dbl-64/k_rem_pio2.c
index ccf1633bd4..ccf1633bd4 100644
--- a/sysdeps/libm-ieee754/k_rem_pio2.c
+++ b/sysdeps/ieee754/dbl-64/k_rem_pio2.c
diff --git a/sysdeps/libm-ieee754/k_sin.c b/sysdeps/ieee754/dbl-64/k_sin.c
index 49c59228e0..49c59228e0 100644
--- a/sysdeps/libm-ieee754/k_sin.c
+++ b/sysdeps/ieee754/dbl-64/k_sin.c
diff --git a/sysdeps/libm-ieee754/k_tan.c b/sysdeps/ieee754/dbl-64/k_tan.c
index 55dafb8ebc..55dafb8ebc 100644
--- a/sysdeps/libm-ieee754/k_tan.c
+++ b/sysdeps/ieee754/dbl-64/k_tan.c
diff --git a/sysdeps/ieee754/mpn2dbl.c b/sysdeps/ieee754/dbl-64/mpn2dbl.c
index 8145eb9c3d..8145eb9c3d 100644
--- a/sysdeps/ieee754/mpn2dbl.c
+++ b/sysdeps/ieee754/dbl-64/mpn2dbl.c
diff --git a/sysdeps/libm-ieee754/s_asinh.c b/sysdeps/ieee754/dbl-64/s_asinh.c
index 985cfe32e1..985cfe32e1 100644
--- a/sysdeps/libm-ieee754/s_asinh.c
+++ b/sysdeps/ieee754/dbl-64/s_asinh.c
diff --git a/sysdeps/libm-ieee754/s_atan.c b/sysdeps/ieee754/dbl-64/s_atan.c
index cad3ba12a8..cad3ba12a8 100644
--- a/sysdeps/libm-ieee754/s_atan.c
+++ b/sysdeps/ieee754/dbl-64/s_atan.c
diff --git a/sysdeps/libm-ieee754/s_cbrt.c b/sysdeps/ieee754/dbl-64/s_cbrt.c
index 753049d375..753049d375 100644
--- a/sysdeps/libm-ieee754/s_cbrt.c
+++ b/sysdeps/ieee754/dbl-64/s_cbrt.c
diff --git a/sysdeps/libm-ieee754/s_ceil.c b/sysdeps/ieee754/dbl-64/s_ceil.c
index 1b352a679e..1b352a679e 100644
--- a/sysdeps/libm-ieee754/s_ceil.c
+++ b/sysdeps/ieee754/dbl-64/s_ceil.c
diff --git a/sysdeps/libm-ieee754/s_copysign.c b/sysdeps/ieee754/dbl-64/s_copysign.c
index 5e35e6943c..5e35e6943c 100644
--- a/sysdeps/libm-ieee754/s_copysign.c
+++ b/sysdeps/ieee754/dbl-64/s_copysign.c
diff --git a/sysdeps/libm-ieee754/s_cos.c b/sysdeps/ieee754/dbl-64/s_cos.c
index 7edb5deafe..7edb5deafe 100644
--- a/sysdeps/libm-ieee754/s_cos.c
+++ b/sysdeps/ieee754/dbl-64/s_cos.c
diff --git a/sysdeps/libm-ieee754/s_erf.c b/sysdeps/ieee754/dbl-64/s_erf.c
index d8b6629a72..d8b6629a72 100644
--- a/sysdeps/libm-ieee754/s_erf.c
+++ b/sysdeps/ieee754/dbl-64/s_erf.c
diff --git a/sysdeps/libm-ieee754/s_exp2.c b/sysdeps/ieee754/dbl-64/s_exp2.c
index 875d4d6f2c..875d4d6f2c 100644
--- a/sysdeps/libm-ieee754/s_exp2.c
+++ b/sysdeps/ieee754/dbl-64/s_exp2.c
diff --git a/sysdeps/libm-ieee754/s_expm1.c b/sysdeps/ieee754/dbl-64/s_expm1.c
index bfd15b2e31..bfd15b2e31 100644
--- a/sysdeps/libm-ieee754/s_expm1.c
+++ b/sysdeps/ieee754/dbl-64/s_expm1.c
diff --git a/sysdeps/libm-ieee754/s_fabs.c b/sysdeps/ieee754/dbl-64/s_fabs.c
index 1abe9432a3..1abe9432a3 100644
--- a/sysdeps/libm-ieee754/s_fabs.c
+++ b/sysdeps/ieee754/dbl-64/s_fabs.c
diff --git a/sysdeps/libm-ieee754/s_finite.c b/sysdeps/ieee754/dbl-64/s_finite.c
index b12ff42360..b12ff42360 100644
--- a/sysdeps/libm-ieee754/s_finite.c
+++ b/sysdeps/ieee754/dbl-64/s_finite.c
diff --git a/sysdeps/libm-ieee754/s_floor.c b/sysdeps/ieee754/dbl-64/s_floor.c
index 77db9ef392..77db9ef392 100644
--- a/sysdeps/libm-ieee754/s_floor.c
+++ b/sysdeps/ieee754/dbl-64/s_floor.c
diff --git a/sysdeps/libm-ieee754/s_fpclassify.c b/sysdeps/ieee754/dbl-64/s_fpclassify.c
index 72a15369b5..72a15369b5 100644
--- a/sysdeps/libm-ieee754/s_fpclassify.c
+++ b/sysdeps/ieee754/dbl-64/s_fpclassify.c
diff --git a/sysdeps/libm-ieee754/s_frexp.c b/sysdeps/ieee754/dbl-64/s_frexp.c
index 7dbddfde06..7dbddfde06 100644
--- a/sysdeps/libm-ieee754/s_frexp.c
+++ b/sysdeps/ieee754/dbl-64/s_frexp.c
diff --git a/sysdeps/libm-ieee754/s_ilogb.c b/sysdeps/ieee754/dbl-64/s_ilogb.c
index 820f01c9b2..820f01c9b2 100644
--- a/sysdeps/libm-ieee754/s_ilogb.c
+++ b/sysdeps/ieee754/dbl-64/s_ilogb.c
diff --git a/sysdeps/libm-ieee754/s_isinf.c b/sysdeps/ieee754/dbl-64/s_isinf.c
index 4f063d09c5..4f063d09c5 100644
--- a/sysdeps/libm-ieee754/s_isinf.c
+++ b/sysdeps/ieee754/dbl-64/s_isinf.c
diff --git a/sysdeps/libm-ieee754/s_isnan.c b/sysdeps/ieee754/dbl-64/s_isnan.c
index 1aed525af1..86301e1531 100644
--- a/sysdeps/libm-ieee754/s_isnan.c
+++ b/sysdeps/ieee754/dbl-64/s_isnan.c
@@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: s_isnan.c,v 1.8 1995/05/10 20:47:36 jtc Exp $";
 	hx &= 0x7fffffff;
 	hx |= (u_int32_t)(lx|(-lx))>>31;
 	hx = 0x7ff00000 - hx;
-	return (int)((u_int32_t)(hx))>>31;
+	return (int)(((u_int32_t)hx)>>31);
 }
 weak_alias (__isnan, isnan)
 #ifdef NO_LONG_DOUBLE
diff --git a/sysdeps/libm-ieee754/s_llrint.c b/sysdeps/ieee754/dbl-64/s_llrint.c
index 8e70bcff36..8e70bcff36 100644
--- a/sysdeps/libm-ieee754/s_llrint.c
+++ b/sysdeps/ieee754/dbl-64/s_llrint.c
diff --git a/sysdeps/libm-ieee754/s_llround.c b/sysdeps/ieee754/dbl-64/s_llround.c
index 92ce10fc42..92ce10fc42 100644
--- a/sysdeps/libm-ieee754/s_llround.c
+++ b/sysdeps/ieee754/dbl-64/s_llround.c
diff --git a/sysdeps/libm-ieee754/s_log1p.c b/sysdeps/ieee754/dbl-64/s_log1p.c
index 0a9801a931..0a9801a931 100644
--- a/sysdeps/libm-ieee754/s_log1p.c
+++ b/sysdeps/ieee754/dbl-64/s_log1p.c
diff --git a/sysdeps/libm-ieee754/s_log2.c b/sysdeps/ieee754/dbl-64/s_log2.c
index 7379ce85e7..7379ce85e7 100644
--- a/sysdeps/libm-ieee754/s_log2.c
+++ b/sysdeps/ieee754/dbl-64/s_log2.c
diff --git a/sysdeps/libm-ieee754/s_logb.c b/sysdeps/ieee754/dbl-64/s_logb.c
index 4668cf78f8..4668cf78f8 100644
--- a/sysdeps/libm-ieee754/s_logb.c
+++ b/sysdeps/ieee754/dbl-64/s_logb.c
diff --git a/sysdeps/libm-ieee754/s_lrint.c b/sysdeps/ieee754/dbl-64/s_lrint.c
index 8f0d717963..8f0d717963 100644
--- a/sysdeps/libm-ieee754/s_lrint.c
+++ b/sysdeps/ieee754/dbl-64/s_lrint.c
diff --git a/sysdeps/libm-ieee754/s_lround.c b/sysdeps/ieee754/dbl-64/s_lround.c
index 49be12f03b..49be12f03b 100644
--- a/sysdeps/libm-ieee754/s_lround.c
+++ b/sysdeps/ieee754/dbl-64/s_lround.c
diff --git a/sysdeps/libm-ieee754/s_modf.c b/sysdeps/ieee754/dbl-64/s_modf.c
index 7851f675a4..7851f675a4 100644
--- a/sysdeps/libm-ieee754/s_modf.c
+++ b/sysdeps/ieee754/dbl-64/s_modf.c
diff --git a/sysdeps/libm-ieee754/s_nearbyint.c b/sysdeps/ieee754/dbl-64/s_nearbyint.c
index 32f5bf9447..32f5bf9447 100644
--- a/sysdeps/libm-ieee754/s_nearbyint.c
+++ b/sysdeps/ieee754/dbl-64/s_nearbyint.c
diff --git a/sysdeps/ieee754/dbl-64/s_nexttoward.c b/sysdeps/ieee754/dbl-64/s_nexttoward.c
new file mode 100644
index 0000000000..c68ba98cb3
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/s_nexttoward.c
@@ -0,0 +1 @@
+/* This function is the same as nextafter so we use an alias there.  */
diff --git a/sysdeps/libm-ieee754/s_remquo.c b/sysdeps/ieee754/dbl-64/s_remquo.c
index 6e32efbba2..6e32efbba2 100644
--- a/sysdeps/libm-ieee754/s_remquo.c
+++ b/sysdeps/ieee754/dbl-64/s_remquo.c
diff --git a/sysdeps/libm-ieee754/s_rint.c b/sysdeps/ieee754/dbl-64/s_rint.c
index e5f241291c..e5f241291c 100644
--- a/sysdeps/libm-ieee754/s_rint.c
+++ b/sysdeps/ieee754/dbl-64/s_rint.c
diff --git a/sysdeps/libm-ieee754/s_round.c b/sysdeps/ieee754/dbl-64/s_round.c
index fdb17f8de8..fdb17f8de8 100644
--- a/sysdeps/libm-ieee754/s_round.c
+++ b/sysdeps/ieee754/dbl-64/s_round.c
diff --git a/sysdeps/libm-ieee754/s_scalbln.c b/sysdeps/ieee754/dbl-64/s_scalbln.c
index aa6134f093..aa6134f093 100644
--- a/sysdeps/libm-ieee754/s_scalbln.c
+++ b/sysdeps/ieee754/dbl-64/s_scalbln.c
diff --git a/sysdeps/libm-ieee754/s_scalbn.c b/sysdeps/ieee754/dbl-64/s_scalbn.c
index 3dbfe8fef0..3dbfe8fef0 100644
--- a/sysdeps/libm-ieee754/s_scalbn.c
+++ b/sysdeps/ieee754/dbl-64/s_scalbn.c
diff --git a/sysdeps/libm-ieee754/s_signbit.c b/sysdeps/ieee754/dbl-64/s_signbit.c
index ee340035fb..ee340035fb 100644
--- a/sysdeps/libm-ieee754/s_signbit.c
+++ b/sysdeps/ieee754/dbl-64/s_signbit.c
diff --git a/sysdeps/libm-ieee754/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
index 376c69ed00..376c69ed00 100644
--- a/sysdeps/libm-ieee754/s_sin.c
+++ b/sysdeps/ieee754/dbl-64/s_sin.c
diff --git a/sysdeps/libm-ieee754/s_sincos.c b/sysdeps/ieee754/dbl-64/s_sincos.c
index 5bc564ba5b..5bc564ba5b 100644
--- a/sysdeps/libm-ieee754/s_sincos.c
+++ b/sysdeps/ieee754/dbl-64/s_sincos.c
diff --git a/sysdeps/libm-ieee754/s_tan.c b/sysdeps/ieee754/dbl-64/s_tan.c
index 714cf27dd2..714cf27dd2 100644
--- a/sysdeps/libm-ieee754/s_tan.c
+++ b/sysdeps/ieee754/dbl-64/s_tan.c
diff --git a/sysdeps/libm-ieee754/s_tanh.c b/sysdeps/ieee754/dbl-64/s_tanh.c
index 944f96386f..944f96386f 100644
--- a/sysdeps/libm-ieee754/s_tanh.c
+++ b/sysdeps/ieee754/dbl-64/s_tanh.c
diff --git a/sysdeps/libm-ieee754/s_trunc.c b/sysdeps/ieee754/dbl-64/s_trunc.c
index 07b4951bcb..07b4951bcb 100644
--- a/sysdeps/libm-ieee754/s_trunc.c
+++ b/sysdeps/ieee754/dbl-64/s_trunc.c
diff --git a/sysdeps/libm-ieee754/t_exp.c b/sysdeps/ieee754/dbl-64/t_exp.c
index b02b4f55ca..b02b4f55ca 100644
--- a/sysdeps/libm-ieee754/t_exp.c
+++ b/sysdeps/ieee754/dbl-64/t_exp.c
diff --git a/sysdeps/libm-ieee754/t_exp2.h b/sysdeps/ieee754/dbl-64/t_exp2.h
index 1fd73338cf..1fd73338cf 100644
--- a/sysdeps/libm-ieee754/t_exp2.h
+++ b/sysdeps/ieee754/dbl-64/t_exp2.h
diff --git a/sysdeps/libm-ieee754/w_exp.c b/sysdeps/ieee754/dbl-64/w_exp.c
index 445c5788d2..445c5788d2 100644
--- a/sysdeps/libm-ieee754/w_exp.c
+++ b/sysdeps/ieee754/dbl-64/w_exp.c
diff --git a/sysdeps/libm-ieee754/Dist b/sysdeps/ieee754/flt-32/Dist
index 4b085470f5..045ac801f6 100644
--- a/sysdeps/libm-ieee754/Dist
+++ b/sysdeps/ieee754/flt-32/Dist
@@ -1,2 +1 @@
-t_exp2.h
 t_exp2f.h
diff --git a/sysdeps/libm-ieee754/e_acosf.c b/sysdeps/ieee754/flt-32/e_acosf.c
index 0d85c4210d..0d85c4210d 100644
--- a/sysdeps/libm-ieee754/e_acosf.c
+++ b/sysdeps/ieee754/flt-32/e_acosf.c
diff --git a/sysdeps/libm-ieee754/e_acoshf.c b/sysdeps/ieee754/flt-32/e_acoshf.c
index c607f72117..c607f72117 100644
--- a/sysdeps/libm-ieee754/e_acoshf.c
+++ b/sysdeps/ieee754/flt-32/e_acoshf.c
diff --git a/sysdeps/libm-ieee754/e_asinf.c b/sysdeps/ieee754/flt-32/e_asinf.c
index 5270f31144..5270f31144 100644
--- a/sysdeps/libm-ieee754/e_asinf.c
+++ b/sysdeps/ieee754/flt-32/e_asinf.c
diff --git a/sysdeps/libm-ieee754/e_atan2f.c b/sysdeps/ieee754/flt-32/e_atan2f.c
index 8b3398c0a3..8b3398c0a3 100644
--- a/sysdeps/libm-ieee754/e_atan2f.c
+++ b/sysdeps/ieee754/flt-32/e_atan2f.c
diff --git a/sysdeps/libm-ieee754/e_atanhf.c b/sysdeps/ieee754/flt-32/e_atanhf.c
index f26a15bbc1..f26a15bbc1 100644
--- a/sysdeps/libm-ieee754/e_atanhf.c
+++ b/sysdeps/ieee754/flt-32/e_atanhf.c
diff --git a/sysdeps/libm-ieee754/e_coshf.c b/sysdeps/ieee754/flt-32/e_coshf.c
index 223fbeea20..223fbeea20 100644
--- a/sysdeps/libm-ieee754/e_coshf.c
+++ b/sysdeps/ieee754/flt-32/e_coshf.c
diff --git a/sysdeps/libm-ieee754/e_expf.c b/sysdeps/ieee754/flt-32/e_expf.c
index e8a9c9d874..e8a9c9d874 100644
--- a/sysdeps/libm-ieee754/e_expf.c
+++ b/sysdeps/ieee754/flt-32/e_expf.c
diff --git a/sysdeps/libm-ieee754/e_fmodf.c b/sysdeps/ieee754/flt-32/e_fmodf.c
index 47b312392c..47b312392c 100644
--- a/sysdeps/libm-ieee754/e_fmodf.c
+++ b/sysdeps/ieee754/flt-32/e_fmodf.c
diff --git a/sysdeps/libm-ieee754/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c
index 926905e7cd..926905e7cd 100644
--- a/sysdeps/libm-ieee754/e_gammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_gammaf_r.c
diff --git a/sysdeps/libm-ieee754/e_hypotf.c b/sysdeps/ieee754/flt-32/e_hypotf.c
index d6b1520cb8..d6b1520cb8 100644
--- a/sysdeps/libm-ieee754/e_hypotf.c
+++ b/sysdeps/ieee754/flt-32/e_hypotf.c
diff --git a/sysdeps/libm-ieee754/e_j0f.c b/sysdeps/ieee754/flt-32/e_j0f.c
index eed171cc90..eed171cc90 100644
--- a/sysdeps/libm-ieee754/e_j0f.c
+++ b/sysdeps/ieee754/flt-32/e_j0f.c
diff --git a/sysdeps/libm-ieee754/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c
index e6f14a16ac..e6f14a16ac 100644
--- a/sysdeps/libm-ieee754/e_j1f.c
+++ b/sysdeps/ieee754/flt-32/e_j1f.c
diff --git a/sysdeps/libm-ieee754/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c
index 9e5279c30a..9e5279c30a 100644
--- a/sysdeps/libm-ieee754/e_jnf.c
+++ b/sysdeps/ieee754/flt-32/e_jnf.c
diff --git a/sysdeps/libm-ieee754/e_lgammaf_r.c b/sysdeps/ieee754/flt-32/e_lgammaf_r.c
index f744d5320e..f744d5320e 100644
--- a/sysdeps/libm-ieee754/e_lgammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_lgammaf_r.c
diff --git a/sysdeps/libm-ieee754/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c
index cea3d9156b..cea3d9156b 100644
--- a/sysdeps/libm-ieee754/e_log10f.c
+++ b/sysdeps/ieee754/flt-32/e_log10f.c
diff --git a/sysdeps/libm-ieee754/e_logf.c b/sysdeps/ieee754/flt-32/e_logf.c
index de8f869df4..de8f869df4 100644
--- a/sysdeps/libm-ieee754/e_logf.c
+++ b/sysdeps/ieee754/flt-32/e_logf.c
diff --git a/sysdeps/libm-ieee754/e_powf.c b/sysdeps/ieee754/flt-32/e_powf.c
index 4798340c84..4798340c84 100644
--- a/sysdeps/libm-ieee754/e_powf.c
+++ b/sysdeps/ieee754/flt-32/e_powf.c
diff --git a/sysdeps/libm-ieee754/e_rem_pio2f.c b/sysdeps/ieee754/flt-32/e_rem_pio2f.c
index 4b8c4466bd..4b8c4466bd 100644
--- a/sysdeps/libm-ieee754/e_rem_pio2f.c
+++ b/sysdeps/ieee754/flt-32/e_rem_pio2f.c
diff --git a/sysdeps/libm-ieee754/e_remainderf.c b/sysdeps/ieee754/flt-32/e_remainderf.c
index 90d0d366d4..90d0d366d4 100644
--- a/sysdeps/libm-ieee754/e_remainderf.c
+++ b/sysdeps/ieee754/flt-32/e_remainderf.c
diff --git a/sysdeps/libm-ieee754/e_sinhf.c b/sysdeps/ieee754/flt-32/e_sinhf.c
index 045f6f121e..045f6f121e 100644
--- a/sysdeps/libm-ieee754/e_sinhf.c
+++ b/sysdeps/ieee754/flt-32/e_sinhf.c
diff --git a/sysdeps/libm-ieee754/e_sqrtf.c b/sysdeps/ieee754/flt-32/e_sqrtf.c
index 7648ef4bca..7648ef4bca 100644
--- a/sysdeps/libm-ieee754/e_sqrtf.c
+++ b/sysdeps/ieee754/flt-32/e_sqrtf.c
diff --git a/sysdeps/libm-ieee754/k_cosf.c b/sysdeps/ieee754/flt-32/k_cosf.c
index b232cab11f..b232cab11f 100644
--- a/sysdeps/libm-ieee754/k_cosf.c
+++ b/sysdeps/ieee754/flt-32/k_cosf.c
diff --git a/sysdeps/libm-ieee754/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c
index 2783480fcb..2783480fcb 100644
--- a/sysdeps/libm-ieee754/k_rem_pio2f.c
+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c
diff --git a/sysdeps/libm-ieee754/k_sinf.c b/sysdeps/ieee754/flt-32/k_sinf.c
index 4fec15e830..4fec15e830 100644
--- a/sysdeps/libm-ieee754/k_sinf.c
+++ b/sysdeps/ieee754/flt-32/k_sinf.c
diff --git a/sysdeps/libm-ieee754/k_tanf.c b/sysdeps/ieee754/flt-32/k_tanf.c
index eb1a670939..eb1a670939 100644
--- a/sysdeps/libm-ieee754/k_tanf.c
+++ b/sysdeps/ieee754/flt-32/k_tanf.c
diff --git a/sysdeps/ieee754/mpn2flt.c b/sysdeps/ieee754/flt-32/mpn2flt.c
index a409b456b0..a409b456b0 100644
--- a/sysdeps/ieee754/mpn2flt.c
+++ b/sysdeps/ieee754/flt-32/mpn2flt.c
diff --git a/sysdeps/libm-ieee754/s_asinhf.c b/sysdeps/ieee754/flt-32/s_asinhf.c
index fac256d37a..fac256d37a 100644
--- a/sysdeps/libm-ieee754/s_asinhf.c
+++ b/sysdeps/ieee754/flt-32/s_asinhf.c
diff --git a/sysdeps/libm-ieee754/s_atanf.c b/sysdeps/ieee754/flt-32/s_atanf.c
index a68933fa6a..a68933fa6a 100644
--- a/sysdeps/libm-ieee754/s_atanf.c
+++ b/sysdeps/ieee754/flt-32/s_atanf.c
diff --git a/sysdeps/libm-ieee754/s_cbrtf.c b/sysdeps/ieee754/flt-32/s_cbrtf.c
index fa0fef9987..fa0fef9987 100644
--- a/sysdeps/libm-ieee754/s_cbrtf.c
+++ b/sysdeps/ieee754/flt-32/s_cbrtf.c
diff --git a/sysdeps/libm-ieee754/s_ceilf.c b/sysdeps/ieee754/flt-32/s_ceilf.c
index 29ccadb049..29ccadb049 100644
--- a/sysdeps/libm-ieee754/s_ceilf.c
+++ b/sysdeps/ieee754/flt-32/s_ceilf.c
diff --git a/sysdeps/libm-ieee754/s_copysignf.c b/sysdeps/ieee754/flt-32/s_copysignf.c
index a4e84e5397..a4e84e5397 100644
--- a/sysdeps/libm-ieee754/s_copysignf.c
+++ b/sysdeps/ieee754/flt-32/s_copysignf.c
diff --git a/sysdeps/libm-ieee754/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c
index 86c59d440c..86c59d440c 100644
--- a/sysdeps/libm-ieee754/s_cosf.c
+++ b/sysdeps/ieee754/flt-32/s_cosf.c
diff --git a/sysdeps/libm-ieee754/s_erff.c b/sysdeps/ieee754/flt-32/s_erff.c
index 774714cfd1..774714cfd1 100644
--- a/sysdeps/libm-ieee754/s_erff.c
+++ b/sysdeps/ieee754/flt-32/s_erff.c
diff --git a/sysdeps/libm-ieee754/s_exp2f.c b/sysdeps/ieee754/flt-32/s_exp2f.c
index 8229885453..8229885453 100644
--- a/sysdeps/libm-ieee754/s_exp2f.c
+++ b/sysdeps/ieee754/flt-32/s_exp2f.c
diff --git a/sysdeps/libm-ieee754/s_expm1f.c b/sysdeps/ieee754/flt-32/s_expm1f.c
index 375e334c38..375e334c38 100644
--- a/sysdeps/libm-ieee754/s_expm1f.c
+++ b/sysdeps/ieee754/flt-32/s_expm1f.c
diff --git a/sysdeps/libm-ieee754/s_fabsf.c b/sysdeps/ieee754/flt-32/s_fabsf.c
index 6b1451379f..6b1451379f 100644
--- a/sysdeps/libm-ieee754/s_fabsf.c
+++ b/sysdeps/ieee754/flt-32/s_fabsf.c
diff --git a/sysdeps/libm-ieee754/s_finitef.c b/sysdeps/ieee754/flt-32/s_finitef.c
index baafc31aec..baafc31aec 100644
--- a/sysdeps/libm-ieee754/s_finitef.c
+++ b/sysdeps/ieee754/flt-32/s_finitef.c
diff --git a/sysdeps/libm-ieee754/s_floorf.c b/sysdeps/ieee754/flt-32/s_floorf.c
index e8822b0884..e8822b0884 100644
--- a/sysdeps/libm-ieee754/s_floorf.c
+++ b/sysdeps/ieee754/flt-32/s_floorf.c
diff --git a/sysdeps/libm-ieee754/s_fpclassifyf.c b/sysdeps/ieee754/flt-32/s_fpclassifyf.c
index a6b35cfe1b..a6b35cfe1b 100644
--- a/sysdeps/libm-ieee754/s_fpclassifyf.c
+++ b/sysdeps/ieee754/flt-32/s_fpclassifyf.c
diff --git a/sysdeps/libm-ieee754/s_frexpf.c b/sysdeps/ieee754/flt-32/s_frexpf.c
index a984457a87..a984457a87 100644
--- a/sysdeps/libm-ieee754/s_frexpf.c
+++ b/sysdeps/ieee754/flt-32/s_frexpf.c
diff --git a/sysdeps/libm-ieee754/s_ilogbf.c b/sysdeps/ieee754/flt-32/s_ilogbf.c
index e652b93619..e652b93619 100644
--- a/sysdeps/libm-ieee754/s_ilogbf.c
+++ b/sysdeps/ieee754/flt-32/s_ilogbf.c
diff --git a/sysdeps/libm-ieee754/s_isinff.c b/sysdeps/ieee754/flt-32/s_isinff.c
index efc0935251..efc0935251 100644
--- a/sysdeps/libm-ieee754/s_isinff.c
+++ b/sysdeps/ieee754/flt-32/s_isinff.c
diff --git a/sysdeps/libm-ieee754/s_isnanf.c b/sysdeps/ieee754/flt-32/s_isnanf.c
index 9ec412fd66..9ec412fd66 100644
--- a/sysdeps/libm-ieee754/s_isnanf.c
+++ b/sysdeps/ieee754/flt-32/s_isnanf.c
diff --git a/sysdeps/libm-ieee754/s_llrintf.c b/sysdeps/ieee754/flt-32/s_llrintf.c
index a812377d19..a812377d19 100644
--- a/sysdeps/libm-ieee754/s_llrintf.c
+++ b/sysdeps/ieee754/flt-32/s_llrintf.c
diff --git a/sysdeps/libm-ieee754/s_llroundf.c b/sysdeps/ieee754/flt-32/s_llroundf.c
index 9aad81fd45..9aad81fd45 100644
--- a/sysdeps/libm-ieee754/s_llroundf.c
+++ b/sysdeps/ieee754/flt-32/s_llroundf.c
diff --git a/sysdeps/libm-ieee754/s_log1pf.c b/sysdeps/ieee754/flt-32/s_log1pf.c
index bd3d57635c..bd3d57635c 100644
--- a/sysdeps/libm-ieee754/s_log1pf.c
+++ b/sysdeps/ieee754/flt-32/s_log1pf.c
diff --git a/sysdeps/libm-ieee754/s_log2f.c b/sysdeps/ieee754/flt-32/s_log2f.c
index 2377acd36a..2377acd36a 100644
--- a/sysdeps/libm-ieee754/s_log2f.c
+++ b/sysdeps/ieee754/flt-32/s_log2f.c
diff --git a/sysdeps/libm-ieee754/s_logbf.c b/sysdeps/ieee754/flt-32/s_logbf.c
index ade892a8f9..ade892a8f9 100644
--- a/sysdeps/libm-ieee754/s_logbf.c
+++ b/sysdeps/ieee754/flt-32/s_logbf.c
diff --git a/sysdeps/libm-ieee754/s_lrintf.c b/sysdeps/ieee754/flt-32/s_lrintf.c
index 210ffec501..210ffec501 100644
--- a/sysdeps/libm-ieee754/s_lrintf.c
+++ b/sysdeps/ieee754/flt-32/s_lrintf.c
diff --git a/sysdeps/libm-ieee754/s_lroundf.c b/sysdeps/ieee754/flt-32/s_lroundf.c
index df1d242e2a..df1d242e2a 100644
--- a/sysdeps/libm-ieee754/s_lroundf.c
+++ b/sysdeps/ieee754/flt-32/s_lroundf.c
diff --git a/sysdeps/libm-ieee754/s_modff.c b/sysdeps/ieee754/flt-32/s_modff.c
index e6c22b2add..e6c22b2add 100644
--- a/sysdeps/libm-ieee754/s_modff.c
+++ b/sysdeps/ieee754/flt-32/s_modff.c
diff --git a/sysdeps/libm-ieee754/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c
index 7d6f262f51..7d6f262f51 100644
--- a/sysdeps/libm-ieee754/s_nearbyintf.c
+++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c
diff --git a/sysdeps/libm-ieee754/s_nextafterf.c b/sysdeps/ieee754/flt-32/s_nextafterf.c
index 611742bdf4..611742bdf4 100644
--- a/sysdeps/libm-ieee754/s_nextafterf.c
+++ b/sysdeps/ieee754/flt-32/s_nextafterf.c
diff --git a/sysdeps/libm-ieee754/s_remquof.c b/sysdeps/ieee754/flt-32/s_remquof.c
index 2ffd16c903..2ffd16c903 100644
--- a/sysdeps/libm-ieee754/s_remquof.c
+++ b/sysdeps/ieee754/flt-32/s_remquof.c
diff --git a/sysdeps/libm-ieee754/s_rintf.c b/sysdeps/ieee754/flt-32/s_rintf.c
index 4e5b409b29..4e5b409b29 100644
--- a/sysdeps/libm-ieee754/s_rintf.c
+++ b/sysdeps/ieee754/flt-32/s_rintf.c
diff --git a/sysdeps/libm-ieee754/s_roundf.c b/sysdeps/ieee754/flt-32/s_roundf.c
index 5dc0e368ff..5dc0e368ff 100644
--- a/sysdeps/libm-ieee754/s_roundf.c
+++ b/sysdeps/ieee754/flt-32/s_roundf.c
diff --git a/sysdeps/libm-ieee754/s_scalblnf.c b/sysdeps/ieee754/flt-32/s_scalblnf.c
index 4ed48733cf..4ed48733cf 100644
--- a/sysdeps/libm-ieee754/s_scalblnf.c
+++ b/sysdeps/ieee754/flt-32/s_scalblnf.c
diff --git a/sysdeps/libm-ieee754/s_scalbnf.c b/sysdeps/ieee754/flt-32/s_scalbnf.c
index 11b77bd6c2..11b77bd6c2 100644
--- a/sysdeps/libm-ieee754/s_scalbnf.c
+++ b/sysdeps/ieee754/flt-32/s_scalbnf.c
diff --git a/sysdeps/libm-ieee754/s_signbitf.c b/sysdeps/ieee754/flt-32/s_signbitf.c
index 85418ea73f..85418ea73f 100644
--- a/sysdeps/libm-ieee754/s_signbitf.c
+++ b/sysdeps/ieee754/flt-32/s_signbitf.c
diff --git a/sysdeps/libm-ieee754/s_sincosf.c b/sysdeps/ieee754/flt-32/s_sincosf.c
index 0fd7b0ca8b..0fd7b0ca8b 100644
--- a/sysdeps/libm-ieee754/s_sincosf.c
+++ b/sysdeps/ieee754/flt-32/s_sincosf.c
diff --git a/sysdeps/libm-ieee754/s_sinf.c b/sysdeps/ieee754/flt-32/s_sinf.c
index 76a7c21fcb..76a7c21fcb 100644
--- a/sysdeps/libm-ieee754/s_sinf.c
+++ b/sysdeps/ieee754/flt-32/s_sinf.c
diff --git a/sysdeps/libm-ieee754/s_tanf.c b/sysdeps/ieee754/flt-32/s_tanf.c
index e8f6016c32..e8f6016c32 100644
--- a/sysdeps/libm-ieee754/s_tanf.c
+++ b/sysdeps/ieee754/flt-32/s_tanf.c
diff --git a/sysdeps/libm-ieee754/s_tanhf.c b/sysdeps/ieee754/flt-32/s_tanhf.c
index 2a0ca9f3df..2a0ca9f3df 100644
--- a/sysdeps/libm-ieee754/s_tanhf.c
+++ b/sysdeps/ieee754/flt-32/s_tanhf.c
diff --git a/sysdeps/libm-ieee754/s_truncf.c b/sysdeps/ieee754/flt-32/s_truncf.c
index feb6b6f23a..feb6b6f23a 100644
--- a/sysdeps/libm-ieee754/s_truncf.c
+++ b/sysdeps/ieee754/flt-32/s_truncf.c
diff --git a/sysdeps/libm-ieee754/t_exp2f.h b/sysdeps/ieee754/flt-32/t_exp2f.h
index e15d15787c..e15d15787c 100644
--- a/sysdeps/libm-ieee754/t_exp2f.h
+++ b/sysdeps/ieee754/flt-32/t_exp2f.h
diff --git a/sysdeps/libm-ieee754/w_expf.c b/sysdeps/ieee754/flt-32/w_expf.c
index ad38fac0f3..ad38fac0f3 100644
--- a/sysdeps/libm-ieee754/w_expf.c
+++ b/sysdeps/ieee754/flt-32/w_expf.c
diff --git a/sysdeps/libm-ieee754/k_standard.c b/sysdeps/ieee754/k_standard.c
index 22300652e9..22300652e9 100644
--- a/sysdeps/libm-ieee754/k_standard.c
+++ b/sysdeps/ieee754/k_standard.c
diff --git a/sysdeps/ieee754/ldbl-128/e_acoshl.c b/sysdeps/ieee754/ldbl-128/e_acoshl.c
new file mode 100644
index 0000000000..7f7934025a
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/e_acoshl.c
@@ -0,0 +1,68 @@
+/* e_acoshl.c -- long double version of e_acosh.c.
+ * Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_acoshl(x)
+ * Method :
+ *	Based on
+ *		acoshl(x) = logl [ x + sqrtl(x*x-1) ]
+ *	we have
+ *		acoshl(x) := logl(x)+ln2,	if x is large; else
+ *		acoshl(x) := logl(2x-1/(sqrtl(x*x-1)+x)) if x>2; else
+ *		acoshl(x) := log1pl(t+sqrtl(2.0*t+t*t)); where t=x-1.
+ *
+ * Special cases:
+ *	acoshl(x) is NaN with signal if x<1.
+ *	acoshl(NaN) is NaN without signal.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double
+#else
+static long double
+#endif
+one	= 1.0,
+ln2	= 0.6931471805599453094172321214581766L;
+
+#ifdef __STDC__
+	long double __ieee754_acoshl(long double x)
+#else
+	long double __ieee754_acoshl(x)
+	long double x;
+#endif
+{
+	long double t;
+	u_int64_t lx;
+	int64_t hx;
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	if(hx<0x3fff000000000000LL) {		/* x < 1 */
+	    return (x-x)/(x-x);
+	} else if(hx >=0x401b000000000000LL) {	/* x > 2**28 */
+	    if(hx >=0x7fff000000000000LL) {	/* x is inf of NaN */
+	        return x+x;
+	    } else
+		return __ieee754_logl(x)+ln2;	/* acoshl(huge)=logl(2x) */
+	} else if(((hx-0x3fff000000000000LL)|lx)==0) {
+	    return 0.0L;			/* acosh(1) = 0 */
+	} else if (hx > 0x4000000000000000LL) {	/* 2**28 > x > 2 */
+	    t=x*x;
+	    return __ieee754_logl(2.0L*x-one/(x+__ieee754_sqrtl(t-one)));
+	} else {			/* 1<x<2 */
+	    t = x-one;
+	    return __log1pl(t+__sqrtl(2.0L*t+t*t));
+	}
+}
diff --git a/sysdeps/ieee754/ldbl-128/e_atan2l.c b/sysdeps/ieee754/ldbl-128/e_atan2l.c
new file mode 100644
index 0000000000..2e081d3bab
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/e_atan2l.c
@@ -0,0 +1,129 @@
+/* e_atan2l.c -- long double version of e_atan2.c.
+ * Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_atan2l(y,x)
+ * Method :
+ *	1. Reduce y to positive by atan2l(y,x)=-atan2l(-y,x).
+ *	2. Reduce x to positive by (if x and y are unexceptional):
+ *		ARG (x+iy) = arctan(y/x)   	   ... if x > 0,
+ *		ARG (x+iy) = pi - arctan[y/(-x)]   ... if x < 0,
+ *
+ * Special cases:
+ *
+ *	ATAN2((anything), NaN ) is NaN;
+ *	ATAN2(NAN , (anything) ) is NaN;
+ *	ATAN2(+-0, +(anything but NaN)) is +-0  ;
+ *	ATAN2(+-0, -(anything but NaN)) is +-pi ;
+ *	ATAN2(+-(anything but 0 and NaN), 0) is +-pi/2;
+ *	ATAN2(+-(anything but INF and NaN), +INF) is +-0 ;
+ *	ATAN2(+-(anything but INF and NaN), -INF) is +-pi;
+ *	ATAN2(+-INF,+INF ) is +-pi/4 ;
+ *	ATAN2(+-INF,-INF ) is +-3pi/4;
+ *	ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2;
+ *
+ * Constants:
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
+ * to produce the hexadecimal values shown.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double
+#else
+static long double
+#endif
+tiny  = 1.0e-4900L,
+zero  = 0.0,
+pi_o_4  = 7.85398163397448309615660845819875699e-01L, /* 3ffe921fb54442d18469898cc51701b8 */
+pi_o_2  = 1.57079632679489661923132169163975140e+00L, /* 3fff921fb54442d18469898cc51701b8 */
+pi      = 3.14159265358979323846264338327950280e+00L, /* 4000921fb54442d18469898cc51701b8 */
+pi_lo   = 8.67181013012378102479704402604335225e-35L; /* 3f8dcd129024e088a67cc74020bbea64 */
+
+#ifdef __STDC__
+	long double __ieee754_atan2l(long double y, long double x)
+#else
+	long double __ieee754_atan2l(y,x)
+	long double  y,x;
+#endif
+{
+	long double z;
+	int64_t k,m,hx,hy,ix,iy;
+	u_int64_t lx,ly;
+
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	ix = hx&0x7fffffffffffffffLL;
+	GET_LDOUBLE_WORDS64(hy,ly,y);
+	iy = hy&0x7fffffffffffffffLL;
+	if(((ix|((lx|-lx)>>63))>0x7fff000000000000LL)||
+	   ((iy|((ly|-ly)>>63))>0x7fff000000000000LL))	/* x or y is NaN */
+	   return x+y;
+	if((hx-0x3fff000000000000LL|lx)==0) return __atanl(y);   /* x=1.0L */
+	m = ((hy>>63)&1)|((hx>>62)&2);	/* 2*sign(x)+sign(y) */
+
+    /* when y = 0 */
+	if((iy|ly)==0) {
+	    switch(m) {
+		case 0:
+		case 1: return y; 	/* atan(+-0,+anything)=+-0 */
+		case 2: return  pi+tiny;/* atan(+0,-anything) = pi */
+		case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
+	    }
+	}
+    /* when x = 0 */
+	if((ix|lx)==0) return (hy<0)?  -pi_o_2-tiny: pi_o_2+tiny;
+
+    /* when x is INF */
+	if(ix==0x7fff000000000000LL) {
+	    if(iy==0x7fff000000000000LL) {
+		switch(m) {
+		    case 0: return  pi_o_4+tiny;/* atan(+INF,+INF) */
+		    case 1: return -pi_o_4-tiny;/* atan(-INF,+INF) */
+		    case 2: return  3.0L*pi_o_4+tiny;/*atan(+INF,-INF)*/
+		    case 3: return -3.0L*pi_o_4-tiny;/*atan(-INF,-INF)*/
+		}
+	    } else {
+		switch(m) {
+		    case 0: return  zero  ;	/* atan(+...,+INF) */
+		    case 1: return -zero  ;	/* atan(-...,+INF) */
+		    case 2: return  pi+tiny  ;	/* atan(+...,-INF) */
+		    case 3: return -pi-tiny  ;	/* atan(-...,-INF) */
+		}
+	    }
+	}
+    /* when y is INF */
+	if(iy==0x7fff000000000000LL) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
+
+    /* compute y/x */
+	k = (iy-ix)>>48;
+	if(k > 120) z=pi_o_2+0.5L*pi_lo; 	/* |y/x| >  2**120 */
+	else if(hx<0&&k<-120) z=0.0L; 		/* |y|/x < -2**120 */
+	else z=__atanl(fabsl(y/x));		/* safe to do y/x */
+	switch (m) {
+	    case 0: return       z  ;	/* atan(+,+) */
+	    case 1: {
+	    	      u_int64_t zh;
+		      GET_LDOUBLE_MSW64(zh,z);
+		      SET_LDOUBLE_MSW64(z,zh ^ 0x8000000000000000ULL);
+		    }
+		    return       z  ;	/* atan(-,+) */
+	    case 2: return  pi-(z-pi_lo);/* atan(+,-) */
+	    default: /* case 3 */
+	    	    return  (z-pi_lo)-pi;/* atan(-,-) */
+	}
+}
diff --git a/sysdeps/ieee754/ldbl-128/e_fmodl.c b/sysdeps/ieee754/ldbl-128/e_fmodl.c
new file mode 100644
index 0000000000..1043f69cb3
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/e_fmodl.c
@@ -0,0 +1,138 @@
+/* e_fmodl.c -- long double version of e_fmod.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice 
+ * is preserved.
+ * ====================================================
+ */
+
+/* 
+ * __ieee754_fmodl(x,y)
+ * Return x mod y in exact arithmetic
+ * Method: shift and subtract
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double one = 1.0, Zero[] = {0.0, -0.0,};
+#else
+static long double one = 1.0, Zero[] = {0.0, -0.0,};
+#endif
+
+#ifdef __STDC__
+	long double __ieee754_fmodl(long double x, long double y)
+#else
+	long double __ieee754_fmodl(x,y)
+	long double x,y;
+#endif
+{
+	int64_t n,hx,hy,hz,ix,iy,sx,i;
+	u_int64_t lx,ly,lz;
+
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	GET_LDOUBLE_WORDS64(hy,ly,y);
+	sx = hx&0x8000000000000000ULL;		/* sign of x */
+	hx ^=sx;				/* |x| */
+	hy &= 0x7fffffffffffffffLL;		/* |y| */
+
+    /* purge off exception values */
+	if((hy|ly)==0||(hx>=0x7fff000000000000LL)|| /* y=0,or x not finite */
+	  ((hy|((ly|-ly)>>63))>0x7fff000000000000LL))	/* or y is NaN */
+	    return (x*y)/(x*y);
+	if(hx<=hy) {
+	    if((hx<hy)||(lx<ly)) return x;	/* |x|<|y| return x */
+	    if(lx==ly) 
+		return Zero[(u_int64_t)sx>>63];	/* |x|=|y| return x*0*/
+	}
+
+    /* determine ix = ilogb(x) */
+	if(hx<0x0001000000000000LL) {	/* subnormal x */
+	    if(hx==0) {
+		for (ix = -16431, i=lx; i>0; i<<=1) ix -=1;
+	    } else {
+		for (ix = -16382, i=hx<<15; i>0; i<<=1) ix -=1;
+	    }
+	} else ix = (hx>>48)-0x3fff;
+
+    /* determine iy = ilogb(y) */
+	if(hy<0x0001000000000000LL) {	/* subnormal y */
+	    if(hy==0) {
+		for (iy = -16431, i=ly; i>0; i<<=1) iy -=1;
+	    } else {
+		for (iy = -16382, i=hy<<15; i>0; i<<=1) iy -=1;
+	    }
+	} else iy = (hy>>48)-0x3fff;
+
+    /* set up {hx,lx}, {hy,ly} and align y to x */
+	if(ix >= -16382) 
+	    hx = 0x0001000000000000LL|(0x0000ffffffffffffLL&hx);
+	else {		/* subnormal x, shift x to normal */
+	    n = -16382-ix;
+	    if(n<=63) {
+	        hx = (hx<<n)|(lx>>(64-n));
+	        lx <<= n;
+	    } else {
+		hx = lx<<(n-64);
+		lx = 0;
+	    }
+	}
+	if(iy >= -16382) 
+	    hy = 0x0001000000000000LL|(0x0000ffffffffffffLL&hy);
+	else {		/* subnormal y, shift y to normal */
+	    n = -16382-iy;
+	    if(n<=63) {
+	        hy = (hy<<n)|(ly>>(64-n));
+	        ly <<= n;
+	    } else {
+		hy = ly<<(n-64);
+		ly = 0;
+	    }
+	}
+
+    /* fix point fmod */
+	n = ix - iy;
+	while(n--) {
+	    hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
+	    if(hz<0){hx = hx+hx+(lx>>63); lx = lx+lx;}
+	    else {
+	    	if((hz|lz)==0) 		/* return sign(x)*0 */
+		    return Zero[(u_int64_t)sx>>63];
+	    	hx = hz+hz+(lz>>63); lx = lz+lz;
+	    }
+	}
+	hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
+	if(hz>=0) {hx=hz;lx=lz;}
+
+    /* convert back to floating value and restore the sign */
+	if((hx|lx)==0) 			/* return sign(x)*0 */
+	    return Zero[(u_int64_t)sx>>63];	
+	while(hx<0x0001000000000000LL) {	/* normalize x */
+	    hx = hx+hx+(lx>>63); lx = lx+lx;
+	    iy -= 1;
+	}
+	if(iy>= -16382) {	/* normalize output */
+	    hx = ((hx-0x0001000000000000LL)|((iy+16383)<<48));
+	    SET_LDOUBLE_WORDS64(x,hx|sx,lx);
+	} else {		/* subnormal output */
+	    n = -16382 - iy;
+	    if(n<=48) {
+		lx = (lx>>n)|((u_int64_t)hx<<(64-n));
+		hx >>= n;
+	    } else if (n<=63) {
+		lx = (hx<<(64-n))|(lx>>n); hx = sx;
+	    } else {
+		lx = hx>>(n-64); hx = sx;
+	    }
+	    SET_LDOUBLE_WORDS64(x,hx|sx,lx);
+	    x *= one;		/* create necessary signal */
+	}
+	return x;		/* exact output */
+}
diff --git a/sysdeps/ieee754/ldbl-128/e_gammal_r.c b/sysdeps/ieee754/ldbl-128/e_gammal_r.c
new file mode 100644
index 0000000000..f77350fa5c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/e_gammal_r.c
@@ -0,0 +1,52 @@
+/* Implementation of gamma function according to ISO C.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+   		  Jakub Jelinek <jj@ultra.linux.cz, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+#include <math_private.h>
+
+
+long double
+__ieee754_gammal_r (long double x, int *signgamp)
+{
+  /* We don't have a real gamma implementation now.  We'll use lgamma
+     and the exp function.  But due to the required boundary
+     conditions we must check some values separately.  */
+  int64_t hx;
+  u_int64_t lx;
+
+  GET_LDOUBLE_WORDS64 (hx, lx, x);
+
+  if (((hx & 0x7fffffffffffffffLL) | lx) == 0)
+    {
+      /* Return value for x == 0 is NaN with invalid exception.  */
+      *signgamp = 0;
+      return x / x;
+    }
+  if (hx < 0 && (u_int64_t) hx < 0xffff000000000000ULL && __rintl (x) == x)
+    {
+      /* Return value for integer x < 0 is NaN with invalid exception.  */
+      *signgamp = 0;
+      return (x - x) / (x - x);
+    }
+
+  /* XXX FIXME.  */
+  return __ieee754_expl (__ieee754_lgammal_r (x, signgamp));
+}
diff --git a/sysdeps/ieee754/ldbl-128/e_remainderl.c b/sysdeps/ieee754/ldbl-128/e_remainderl.c
new file mode 100644
index 0000000000..81af247b33
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/e_remainderl.c
@@ -0,0 +1,78 @@
+/* e_fmodl.c -- long double version of e_fmod.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice 
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_remainderl(x,p)
+ * Return :                  
+ * 	returns  x REM p  =  x - [x/p]*p as if in infinite 
+ * 	precise arithmetic, where [x/p] is the (infinite bit) 
+ *	integer nearest x/p (in half way case choose the even one).
+ * Method : 
+ *	Based on fmodl() return x-[x/p]chopped*p exactlp.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double zero = 0.0L;
+#else
+static long double zero = 0.0L;
+#endif
+
+
+#ifdef __STDC__
+	long double __ieee754_remainderl(long double x, long double p)
+#else
+	long double __ieee754_remainderl(x,p)
+	long double x,p;
+#endif
+{
+	int64_t hx,hp;
+	u_int64_t sx,lx,lp;
+	long double p_half;
+
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	GET_LDOUBLE_WORDS64(hp,lp,p);
+	sx = hx&0x8000000000000000ULL;
+	hp &= 0x7fffffffffffffffLL;
+	hx &= 0x7fffffffffffffffLL;
+
+    /* purge off exception values */
+	if((hp|lp)==0) return (x*p)/(x*p); 	/* p = 0 */
+	if((hx>=0x7fff000000000000LL)||			/* x not finite */
+	  ((hp>=0x7fff000000000000LL)&&			/* p is NaN */
+	  (((hp-0x7fff000000000000LL)|lp)!=0)))
+	    return (x*p)/(x*p);
+
+
+	if (hp<=0x7ffdffffffffffffLL) x = __ieee754_fmodl(x,p+p);	/* now x < 2p */
+	if (((hx-hp)|(lx-lp))==0) return zero*x;
+	x  = fabsl(x);
+	p  = fabsl(p);
+	if (hp<0x0002000000000000LL) {
+	    if(x+x>p) {
+		x-=p;
+		if(x+x>=p) x -= p;
+	    }
+	} else {
+	    p_half = 0.5L*p;
+	    if(x>p_half) {
+		x-=p;
+		if(x>=p_half) x -= p;
+	    }
+	}
+	GET_LDOUBLE_MSW64(hx,x);
+	SET_LDOUBLE_MSW64(x,hx^sx);
+	return x;
+}
diff --git a/sysdeps/ieee754/ldbl-128/ieee754.h b/sysdeps/ieee754/ldbl-128/ieee754.h
new file mode 100644
index 0000000000..c3b2f38916
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/ieee754.h
@@ -0,0 +1,171 @@
+/* Copyright (C) 1992, 1995, 1996, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifndef _IEEE754_H
+
+#define _IEEE754_H 1
+#include <features.h>
+
+#include <endian.h>
+
+__BEGIN_DECLS
+
+union ieee754_float
+  {
+    float f;
+
+    /* This is the IEEE 754 single-precision format.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:8;
+	unsigned int mantissa:23;
+#endif				/* Big endian.  */
+#if	__BYTE_ORDER == __LITTLE_ENDIAN
+	unsigned int mantissa:23;
+	unsigned int exponent:8;
+	unsigned int negative:1;
+#endif				/* Little endian.  */
+      } ieee;
+
+    /* This format makes it easier to see if a NaN is a signalling NaN.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:8;
+	unsigned int quiet_nan:1;
+	unsigned int mantissa:22;
+#endif				/* Big endian.  */
+#if	__BYTE_ORDER == __LITTLE_ENDIAN
+	unsigned int mantissa:22;
+	unsigned int quiet_nan:1;
+	unsigned int exponent:8;
+	unsigned int negative:1;
+#endif				/* Little endian.  */
+      } ieee_nan;
+  };
+
+#define IEEE754_FLOAT_BIAS	0x7f /* Added to exponent.  */
+
+
+union ieee754_double
+  {
+    double d;
+
+    /* This is the IEEE 754 double-precision format.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:11;
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa0:20;
+	unsigned int mantissa1:32;
+#endif				/* Big endian.  */
+#if	__BYTE_ORDER == __LITTLE_ENDIAN
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa1:32;
+	unsigned int mantissa0:20;
+	unsigned int exponent:11;
+	unsigned int negative:1;
+#endif				/* Little endian.  */
+      } ieee;
+
+    /* This format makes it easier to see if a NaN is a signalling NaN.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:11;
+	unsigned int quiet_nan:1;
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa0:19;
+	unsigned int mantissa1:32;
+#else
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa1:32;
+	unsigned int mantissa0:19;
+	unsigned int quiet_nan:1;
+	unsigned int exponent:11;
+	unsigned int negative:1;
+#endif
+      } ieee_nan;
+  };
+
+#define IEEE754_DOUBLE_BIAS	0x3ff /* Added to exponent.  */
+
+
+union ieee854_long_double
+  {
+    long double d;
+
+    /* This is the IEEE 854 quad-precision format.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:15;
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa0:16;
+	unsigned int mantissa1:32;
+	unsigned int mantissa2:32;
+	unsigned int mantissa3:32;
+#endif				/* Big endian.  */
+#if	__BYTE_ORDER == __LITTLE_ENDIAN
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa3:32;
+	unsigned int mantissa2:32;
+	unsigned int mantissa1:32;
+	unsigned int mantissa0:16;
+	unsigned int exponent:15;
+	unsigned int negative:1;
+#endif				/* Little endian.  */
+      } ieee;
+
+    /* This format makes it easier to see if a NaN is a signalling NaN.  */
+    struct
+      {
+#if	__BYTE_ORDER == __BIG_ENDIAN
+	unsigned int negative:1;
+	unsigned int exponent:15;
+	unsigned int quiet_nan:1;
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa0:15;
+	unsigned int mantissa1:32;
+	unsigned int mantissa2:32;
+	unsigned int mantissa3:32;
+#else
+	/* Together these comprise the mantissa.  */
+	unsigned int mantissa3:32;
+	unsigned int mantissa2:32;
+	unsigned int mantissa1:32;
+	unsigned int mantissa0:15;
+	unsigned int quiet_nan:1;
+	unsigned int exponent:15;
+	unsigned int negative:1;
+#endif
+      } ieee_nan;
+  };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent.  */
+
+__END_DECLS
+
+#endif /* ieee754.h */
diff --git a/sysdeps/ieee754/ldbl-128/ldbl2mpn.c b/sysdeps/ieee754/ldbl-128/ldbl2mpn.c
new file mode 100644
index 0000000000..68ecea8753
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/ldbl2mpn.c
@@ -0,0 +1,137 @@
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include "gmp.h"
+#include "gmp-impl.h"
+#include "longlong.h"
+#include <ieee754.h>
+#include <float.h>
+#include <math.h>
+#include <stdlib.h>
+
+/* Convert a `long double' in IEEE854 quad-precision format to a
+   multi-precision integer representing the significand scaled up by its
+   number of bits (113 for long double) and an integral power of two
+   (MPN frexpl). */
+
+mp_size_t
+__mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
+			   int *expt, int *is_neg,
+			   long double value)
+{
+  union ieee854_long_double u;
+  u.d = value;
+
+  *is_neg = u.ieee.negative;
+  *expt = (int) u.ieee.exponent - IEEE854_LONG_DOUBLE_BIAS;
+
+#if BITS_PER_MP_LIMB == 32
+  res_ptr[0] = u.ieee.mantissa3; /* Low-order 32 bits of fraction.  */
+  res_ptr[1] = u.ieee.mantissa2;
+  res_ptr[2] = u.ieee.mantissa1;
+  res_ptr[3] = u.ieee.mantissa0; /* High-order 32 bits.  */
+  #define N 4
+#elif BITS_PER_MP_LIMB == 64
+  /* Hopefully the compiler will combine the two bitfield extracts
+     and this composition into just the original quadword extract.  */
+  res_ptr[0] = ((unsigned long int) u.ieee.mantissa2 << 32) | u.ieee.mantissa3;
+  res_ptr[1] = ((unsigned long int) u.ieee.mantissa0 << 32) | u.ieee.mantissa1;
+  #define N 2
+#else
+  #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
+#endif
+/* The format does not fill the last limb.  There are some zeros.  */
+#define NUM_LEADING_ZEROS (BITS_PER_MP_LIMB \
+			   - (LDBL_MANT_DIG - ((N - 1) * BITS_PER_MP_LIMB)))
+
+  if (u.ieee.exponent == 0)
+    {
+      /* A biased exponent of zero is a special case.
+	 Either it is a zero or it is a denormal number.  */
+      if (res_ptr[0] == 0 && res_ptr[1] == 0
+          && res_ptr[N - 2] == 0 && res_ptr[N - 1] == 0) /* Assumes N<=4.  */
+	/* It's zero.  */
+	*expt = 0;
+      else
+	{
+          /* It is a denormal number, meaning it has no implicit leading
+  	     one bit, and its exponent is in fact the format minimum.  */
+	  int cnt;
+
+#if N == 2
+	  if (res_ptr[N - 1] != 0)
+	    {
+	      count_leading_zeros (cnt, res_ptr[N - 1]);
+	      cnt -= NUM_LEADING_ZEROS;
+	      res_ptr[N - 1] = res_ptr[N - 1] << cnt
+			       | (res_ptr[0] >> (BITS_PER_MP_LIMB - cnt));
+	      res_ptr[0] <<= cnt;
+	      *expt = LDBL_MIN_EXP - 1 - cnt;
+	    }
+	  else
+	    {
+	      count_leading_zeros (cnt, res_ptr[0]);
+	      if (cnt >= NUM_LEADING_ZEROS)
+		{
+		  res_ptr[N - 1] = res_ptr[0] << (cnt - NUM_LEADING_ZEROS);
+		  res_ptr[0] = 0;
+		}
+	      else
+		{
+		  res_ptr[N - 1] = res_ptr[0] >> (NUM_LEADING_ZEROS - cnt);
+		  res_ptr[0] <<= BITS_PER_MP_LIMB - (NUM_LEADING_ZEROS - cnt);
+		}
+	      *expt = LDBL_MIN_EXP - 1
+		- (BITS_PER_MP_LIMB - NUM_LEADING_ZEROS) - cnt;
+	    }
+#else
+	  int j, k, l;
+
+	  for (j = N - 1; j > 0; j++)
+	    if (res_ptr[j] != 0)
+	      break;
+
+	  count_leading_zeros (cnt, res_ptr[j]);
+	  cnt -= NUM_LEADING_ZEROS;
+	  l = N - 1 - j;
+	  if (cnt < 0)
+	    {
+	      cnt += BITS_PER_MP_LIMB;
+	      l++;
+	    }
+	  if (!cnt)
+	    for (k = N - 1; k >= l; k--)
+	      res_ptr[k] = res_ptr[k-l];
+	  else
+	    for (k = N - 1; k >= l; k--)
+	      res_ptr[k] = res_ptr[k-l] << cnt
+			   | res_ptr[k-l-1] >> (BITS_PER_MP_LIMB - cnt);
+	    res_ptr[k--] = res_ptr[0] << cnt;
+
+	  for (; k >= 0; k--)
+	    res_ptr[k] = 0;
+	  *expt = LDBL_MIN_EXP - 1 - 3 * BITS_PER_MP_LIMB - cnt;
+#endif
+	}
+    }
+  else
+    /* Add the implicit leading one bit for a normalized number.  */
+    res_ptr[N - 1] |= 1L << (LDBL_MANT_DIG - 1 - ((N - 1) * BITS_PER_MP_LIMB));
+
+  return N;
+}
diff --git a/sysdeps/ieee754/ldbl-128/math_ldbl.h b/sysdeps/ieee754/ldbl-128/math_ldbl.h
new file mode 100644
index 0000000000..aecb20a972
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/math_ldbl.h
@@ -0,0 +1,82 @@
+#ifndef _MATH_PRIVATE_H_
+#error "Never use <math_ldbl.h> directly; include <math_private.h> instead."
+#endif
+
+/* A union which permits us to convert between a long double and
+   four 32 bit ints or two 64 bit ints.  */
+
+#if __FLOAT_WORD_ORDER == BIG_ENDIAN
+
+typedef union
+{
+  long double value;
+  struct
+  {
+    u_int64_t msw;
+    u_int64_t lsw;
+  } parts64;
+  struct
+  {
+    u_int32_t w0, w1, w2, w3;
+  } parts32;
+} ieee854_long_double_shape_type;
+
+#endif
+
+#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
+
+typedef union
+{
+  long double value;
+  struct
+  {
+    u_int64_t lsw;
+    u_int64_t msw;
+  } parts64;
+  struct
+  {
+    u_int32_t w3, w2, w1, w0;
+  } parts32;
+} ieee854_long_double_shape_type;
+
+#endif
+
+/* Get two 64 bit ints from a long double.  */
+
+#define GET_LDOUBLE_WORDS64(ix0,ix1,d)				\
+do {								\
+  ieee854_long_double_shape_type qw_u;				\
+  qw_u.value = (d);						\
+  (ix0) = qw_u.parts64.msw;					\
+  (ix1) = qw_u.parts64.lsw;					\
+} while (0)
+
+/* Set a long double from two 64 bit ints.  */
+
+#define SET_LDOUBLE_WORDS64(d,ix0,ix1)				\
+do {								\
+  ieee854_long_double_shape_type qw_u;				\
+  qw_u.parts64.msw = (ix0);					\
+  qw_u.parts64.lsw = (ix1);					\
+  (d) = qw_u.value;						\
+} while (0)
+
+/* Get the more significant 64 bits of a long double mantissa.  */
+
+#define GET_LDOUBLE_MSW64(v,d)					\
+do {								\
+  ieee854_long_double_shape_type sh_u;				\
+  sh_u.value = (d);						\
+  (v) = sh_u.parts64.msw;					\
+} while (0)
+
+/* Set the more significant 64 bits of a long double mantissa from an int.  */
+
+#define SET_LDOUBLE_MSW64(d,v)					\
+do {								\
+  ieee854_long_double_shape_type sh_u;				\
+  sh_u.value = (d);						\
+  sh_u.parts64.msw = (v);					\
+  (d) = sh_u.value;						\
+} while (0)
+
diff --git a/sysdeps/ieee754/ldbl-128/mpn2ldbl.c b/sysdeps/ieee754/ldbl-128/mpn2ldbl.c
new file mode 100644
index 0000000000..d9cc4521c8
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/mpn2ldbl.c
@@ -0,0 +1,51 @@
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include "gmp.h"
+#include "gmp-impl.h"
+#include <ieee754.h>
+#include <float.h>
+#include <math.h>
+
+/* Convert a multi-precision integer of the needed number of bits (113 for
+   long double) and an integral power of two to a `long double' in IEEE854
+   quad-precision format.  */
+
+long double
+__mpn_construct_long_double (mp_srcptr frac_ptr, int expt, int sign)
+{
+  union ieee854_long_double u;
+
+  u.ieee.negative = sign;
+  u.ieee.exponent = expt + IEEE854_LONG_DOUBLE_BIAS;
+#if BITS_PER_MP_LIMB == 32
+  u.ieee.mantissa3 = frac_ptr[0];
+  u.ieee.mantissa2 = frac_ptr[1];
+  u.ieee.mantissa1 = frac_ptr[2];
+  u.ieee.mantissa0 = frac_ptr[3] & ((1 << (LDBL_MANT_DIG - 96)) - 1);
+#elif BITS_PER_MP_LIMB == 64
+  u.ieee.mantissa3 = frac_ptr[0] & ((1L << 32) - 1);
+  u.ieee.mantissa2 = frac_ptr[0] >> 32;
+  u.ieee.mantissa1 = frac_ptr[1] & ((1L << 32) - 1);
+  u.ieee.mantissa0 = (frac_ptr[1] >> 32) & ((1 << (LDBL_MANT_DIG - 96)) - 1);
+#else
+  #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
+#endif
+
+  return u.d;
+}
diff --git a/sysdeps/ieee754/ldbl-128/printf_fphex.c b/sysdeps/ieee754/ldbl-128/printf_fphex.c
new file mode 100644
index 0000000000..e25d668d9a
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/printf_fphex.c
@@ -0,0 +1,84 @@
+/* Print floating point number in hexadecimal notation according to
+   ISO C 9X.
+   Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#define PRINT_FPHEX_LONG_DOUBLE \
+do {									      \
+      /* We have 112 bits of mantissa plus one implicit digit.  Since	      \
+	 112 bits are representable without rest using hexadecimal	      \
+	 digits we use only the implicit digits for the number before	      \
+	 the decimal point.  */						      \
+      unsigned long long int num0, num1;				      \
+									      \
+      assert (sizeof (long double) == 16);				      \
+									      \
+      num0 = (((unsigned long long int) fpnum.ldbl.ieee.mantissa0) << 32      \
+	     | fpnum.ldbl.ieee.mantissa1);				      \
+      num1 = (((unsigned long long int) fpnum.ldbl.ieee.mantissa2) << 32      \
+	     | fpnum.ldbl.ieee.mantissa3);				      \
+									      \
+      zero_mantissa = (num0|num1) == 0;					      \
+									      \
+      if (sizeof (unsigned long int) > 6)				      \
+	numstr = _itoa_word (num1, numbuf + sizeof numbuf, 16,		      \
+			     info->spec == 'A');			      \
+      else								      \
+	numstr = _itoa (num1, numbuf + sizeof numbuf, 16,		      \
+			info->spec == 'A');				      \
+									      \
+      while (numstr > numbuf + (sizeof numbuf - 64 / 4))		      \
+	*--numstr = '0';						      \
+									      \
+      if (sizeof (unsigned long int) > 6)				      \
+	numstr = _itoa_word (num0, numstr, 16, info->spec == 'A');	      \
+      else								      \
+	numstr = _itoa (num0, numstr, 16, info->spec == 'A');		      \
+									      \
+      /* Fill with zeroes.  */						      \
+      while (numstr > numbuf + (sizeof numbuf - 112 / 4))		      \
+	*--numstr = '0';						      \
+									      \
+      leading = fpnum.ldbl.ieee.exponent == 0 ? '0' : '1';		      \
+									      \
+      exponent = fpnum.ldbl.ieee.exponent;				      \
+									      \
+      if (exponent == 0)						      \
+	{								      \
+	  if (zero_mantissa)						      \
+	    expnegative = 0;						      \
+	  else								      \
+	    {								      \
+	      /* This is a denormalized number.  */			      \
+	      expnegative = 1;						      \
+	      exponent = IEEE854_LONG_DOUBLE_BIAS - 1;			      \
+	    }								      \
+	}								      \
+      else if (exponent >= IEEE854_LONG_DOUBLE_BIAS)			      \
+	{								      \
+	  expnegative = 0;						      \
+	  exponent -= IEEE854_LONG_DOUBLE_BIAS;				      \
+	}								      \
+      else								      \
+	{								      \
+	  expnegative = 1;						      \
+	  exponent = -(exponent - IEEE854_LONG_DOUBLE_BIAS);		      \
+	}								      \
+} while (0)
+
+#include <sysdeps/generic/printf_fphex.c>
diff --git a/sysdeps/ieee754/ldbl-128/s_ceill.c b/sysdeps/ieee754/ldbl-128/s_ceill.c
new file mode 100644
index 0000000000..f241554042
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_ceill.c
@@ -0,0 +1,84 @@
+/* s_ceill.c -- long double version of s_ceil.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * ceill(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ *	Bit twiddling.
+ * Exception:
+ *	Inexact flag raised if x not equal to ceil(x).
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double huge = 1.0e4930;
+#else
+static long double huge = 1.0e4930;
+#endif
+
+#ifdef __STDC__
+	long double __ceill(long double x)
+#else
+	long double __ceill(x)
+	long double x;
+#endif
+{
+	int64_t i0,i1,j0;
+	u_int64_t i,j;
+	GET_LDOUBLE_WORDS64(i0,i1,x);
+	j0 = ((i0>>48)&0x7fff)-0x3fff;
+	if(j0<48) {
+	    if(j0<0) { 	/* raise inexact if x != 0 */
+		if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
+		    if(i0<0) {i0=0x8000000000000000ULL;i1=0;}
+		    else if((i0|i1)!=0) { i0=0x3fff000000000000ULL;i1=0;}
+		}
+	    } else {
+		i = (0x7fffffffffffffffULL)>>j0;
+		if(((i0&i)|i1)==0) return x; /* x is integral */
+		if(huge+x>0.0) {	/* raise inexact flag */
+		    if(i0>0) i0 += (0x0001000000000000LL)>>j0;
+		    i0 &= (~i); i1=0;
+		}
+	    }
+	} else if (j0>111) {
+	    if(j0==0x4000) return x+x;	/* inf or NaN */
+	    else return x;		/* x is integral */
+	} else {
+	    i = -1ULL>>(j0-48);
+	    if((i1&i)==0) return x;	/* x is integral */
+	    if(huge+x>0.0) { 		/* raise inexact flag */
+		if(i0>0) {
+		    if(j0==48) i0+=1;
+		    else {
+			j = i1+(1LL<<(112-j0));
+			if(j<i1) i0 +=1 ; 	/* got a carry */
+			i1=j;
+		    }
+		}
+		i1 &= (~i);
+	    }
+	}
+	SET_LDOUBLE_WORDS64(x,i0,i1);
+	return x;
+}
+weak_alias (__ceill, ceill)
diff --git a/sysdeps/libm-ieee754/w_fmodl.c b/sysdeps/ieee754/ldbl-128/s_copysignl.c
index 71ed4a94a4..cece4f2496 100644
--- a/sysdeps/libm-ieee754/w_fmodl.c
+++ b/sysdeps/ieee754/ldbl-128/s_copysignl.c
@@ -1,6 +1,5 @@
-/* w_fmodl.c -- long double version of w_fmod.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
+/* s_copysignl.c -- long double version of s_copysign.c.
+ * Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
  */
 
 /*
@@ -19,30 +18,26 @@ static char rcsid[] = "$NetBSD: $";
 #endif
 
 /*
- * wrapper fmodl(x,y)
+ * copysignl(long double x, long double y)
+ * copysignl(x,y) returns a value with the magnitude of x and
+ * with the sign bit of y.
  */
 
 #include "math.h"
 #include "math_private.h"
 
-
 #ifdef __STDC__
-	long double __fmodl(long double x, long double y)/* wrapper fmodl */
+	long double __copysignl(long double x, long double y)
 #else
-	long double __fmodl(x,y)		/* wrapper fmodl */
+	long double __copysignl(x,y)
 	long double x,y;
 #endif
 {
-#ifdef _IEEE_LIBM
-	return __ieee754_fmodl(x,y);
-#else
-	long double z;
-	z = __ieee754_fmodl(x,y);
-	if(_LIB_VERSION == _IEEE_ ||__isnanl(y)||__isnanl(x)) return z;
-	if(y==0.0) {
-	        return __kernel_standard(x,y,227); /* fmod(x,0) */
-	} else
-	    return z;
-#endif
+	u_int64_t hx,hy;
+	GET_LDOUBLE_MSW64(hx,x);
+	GET_LDOUBLE_MSW64(hy,y);
+	SET_LDOUBLE_MSW64(x,(hx&0x7fffffffffffffffULL)
+			    |(hy&0x8000000000000000ULL));
+        return x;
 }
-weak_alias (__fmodl, fmodl)
+weak_alias (__copysignl, copysignl)
diff --git a/sysdeps/ieee754/ldbl-128/s_cosl.c b/sysdeps/ieee754/ldbl-128/s_cosl.c
new file mode 100644
index 0000000000..d1258b2cf1
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_cosl.c
@@ -0,0 +1,83 @@
+/* s_cosl.c -- long double version of s_cos.c.
+ * Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* cosl(x)
+ * Return cosine function of x.
+ *
+ * kernel function:
+ *	__kernel_sinl		... sine function on [-pi/4,pi/4]
+ *	__kernel_cosl		... cosine function on [-pi/4,pi/4]
+ *	__ieee754_rem_pio2l	... argument reduction routine
+ *
+ * Method.
+ *      Let S,C and T denote the sin, cos and tan respectively on
+ *	[-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
+ *	in [-pi/4 , +pi/4], and let n = k mod 4.
+ *	We have
+ *
+ *          n        sin(x)      cos(x)        tan(x)
+ *     ----------------------------------------------------------
+ *	    0	       S	   C		 T
+ *	    1	       C	  -S		-1/T
+ *	    2	      -S	  -C		 T
+ *	    3	      -C	   S		-1/T
+ *     ----------------------------------------------------------
+ *
+ * Special cases:
+ *      Let trig be any of sin, cos, or tan.
+ *      trig(+-INF)  is NaN, with signals;
+ *      trig(NaN)    is that NaN;
+ *
+ * Accuracy:
+ *	TRIG(x) returns trig(x) nearly rounded
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+	long double __cosl(long double x)
+#else
+	long double __cosl(x)
+	long double x;
+#endif
+{
+	long double y[2],z=0.0L;
+	int64_t n, ix;
+
+    /* High word of x. */
+	GET_LDOUBLE_MSW64(ix,x);
+
+    /* |x| ~< pi/4 */
+	ix &= 0x7fffffffffffffffLL;
+	if(ix <= 0x3ffe921fb54442d1LL)
+	  return __kernel_cosl(x,z);
+
+    /* cos(Inf or NaN) is NaN */
+	else if (ix>=0x7fff000000000000LL) return x-x;
+
+    /* argument reduction needed */
+	else {
+	    n = __ieee754_rem_pio2l(x,y);
+	    switch(n&3) {
+		case 0: return  __kernel_cosl(y[0],y[1]);
+		case 1: return -__kernel_sinl(y[0],y[1],1);
+		case 2: return -__kernel_cosl(y[0],y[1]);
+		default:
+		        return  __kernel_sinl(y[0],y[1],1);
+	    }
+	}
+}
+weak_alias (__cosl, cosl)
diff --git a/sysdeps/libm-ieee754/w_sqrtl.c b/sysdeps/ieee754/ldbl-128/s_fabsl.c
index 5873ce93ab..c0fd05af63 100644
--- a/sysdeps/libm-ieee754/w_sqrtl.c
+++ b/sysdeps/ieee754/ldbl-128/s_fabsl.c
@@ -1,6 +1,5 @@
-/* w_sqrtl.c -- long double version of w_sqrt.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
+/* s_fabsl.c -- long double version of s_fabs.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
  */
 
 /*
@@ -19,29 +18,22 @@ static char rcsid[] = "$NetBSD: $";
 #endif
 
 /*
- * wrapper sqrtl(x)
+ * fabsl(x) returns the absolute value of x.
  */
 
 #include "math.h"
 #include "math_private.h"
 
 #ifdef __STDC__
-	long double __sqrtl(long double x)	/* wrapper sqrtl */
+	long double __fabsl(long double x)
 #else
-	long double __sqrtl(x)			/* wrapper sqrtl */
+	long double __fabsl(x)
 	long double x;
 #endif
 {
-#ifdef _IEEE_LIBM
-	return __ieee754_sqrtl(x);
-#else
-	long double z;
-	z = __ieee754_sqrtl(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
-	if(x<0.0) {
-	    return __kernel_standard(x,x,226); /* sqrt(negative) */
-	} else
-	    return z;
-#endif
+	u_int64_t hx;
+	GET_LDOUBLE_MSW64(hx,x);
+	SET_LDOUBLE_MSW64(x,hx&0x7fffffffffffffffLL);
+        return x;
 }
-weak_alias (__sqrtl, sqrtl)
+weak_alias (__fabsl, fabsl)
diff --git a/sysdeps/libm-ieee754/w_acosl.c b/sysdeps/ieee754/ldbl-128/s_finitel.c
index cd9cecf2f9..dd176c1e7a 100644
--- a/sysdeps/libm-ieee754/w_acosl.c
+++ b/sysdeps/ieee754/ldbl-128/s_finitel.c
@@ -1,6 +1,5 @@
-/* w_acosl.c -- long double version of w_acos.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
+/* s_finitel.c -- long double version of s_finite.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
  */
 
 /*
@@ -19,30 +18,23 @@ static char rcsid[] = "$NetBSD: $";
 #endif
 
 /*
- * wrap_acosl(x)
+ * finitel(x) returns 1 is x is finite, else 0;
+ * no branching!
  */
 
 #include "math.h"
 #include "math_private.h"
 
-
 #ifdef __STDC__
-	long double __acosl(long double x)	/* wrapper acos */
+	int __finitel(long double x)
 #else
-	long double __acosl(x)			/* wrapper acos */
+	int __finitel(x)
 	long double x;
 #endif
 {
-#ifdef _IEEE_LIBM
-	return __ieee754_acosl(x);
-#else
-	long double z;
-	z = __ieee754_acosl(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
-	if(fabsl(x)>1.0) {
-	        return __kernel_standard(x,x,201); /* acosl(|x|>1) */
-	} else
-	    return z;
-#endif
+	int64_t hx;
+	GET_LDOUBLE_MSW64(hx,x);
+	return (int)((u_int64_t)((hx&0x7fffffffffffffffLL)
+				 -0x7fff000000000000LL)>>63);
 }
-weak_alias (__acosl, acosl)
+weak_alias (__finitel, finitel)
diff --git a/sysdeps/ieee754/ldbl-128/s_floorl.c b/sysdeps/ieee754/ldbl-128/s_floorl.c
new file mode 100644
index 0000000000..c9b8b70dbf
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_floorl.c
@@ -0,0 +1,85 @@
+/* s_floorl.c -- long double version of s_floor.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * floorl(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ *	Bit twiddling.
+ * Exception:
+ *	Inexact flag raised if x not equal to floor(x).
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double huge = 1.0e4930;
+#else
+static long double huge = 1.0e4930;
+#endif
+
+#ifdef __STDC__
+	long double __floorl(long double x)
+#else
+	long double __floorl(x)
+	long double x;
+#endif
+{
+	int64_t i0,i1,j0;
+	u_int64_t i,j;
+	GET_LDOUBLE_WORDS64(i0,i1,x);
+	j0 = ((i0>>48)&0x7fff)-0x3fff;
+	if(j0<48) {
+	    if(j0<0) { 	/* raise inexact if x != 0 */
+		if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
+		    if(i0>=0) {i0=i1=0;}
+		    else if(((i0&0x7fffffffffffffffLL)|i1)!=0)
+			{ i0=0xbfff000000000000ULL;i1=0;}
+		}
+	    } else {
+		i = (0x7fffffffffffffffULL)>>j0;
+		if(((i0&i)|i1)==0) return x; /* x is integral */
+		if(huge+x>0.0) {	/* raise inexact flag */
+		    if(i0<0) i0 += (0x0001000000000000LL)>>j0;
+		    i0 &= (~i); i1=0;
+		}
+	    }
+	} else if (j0>111) {
+	    if(j0==0x4000) return x+x;	/* inf or NaN */
+	    else return x;		/* x is integral */
+	} else {
+	    i = -1ULL>>(j0-48);
+	    if((i1&i)==0) return x;	/* x is integral */
+	    if(huge+x>0.0) { 		/* raise inexact flag */
+		if(i0<0) {
+		    if(j0==48) i0+=1;
+		    else {
+			j = i1+(1LL<<(112-j0));
+			if(j<i1) i0 +=1 ; 	/* got a carry */
+			i1=j;
+		    }
+		}
+		i1 &= (~i);
+	    }
+	}
+	SET_LDOUBLE_WORDS64(x,i0,i1);
+	return x;
+}
+weak_alias (__floorl, floorl)
diff --git a/sysdeps/ieee754/ldbl-128/s_fpclassifyl.c b/sysdeps/ieee754/ldbl-128/s_fpclassifyl.c
new file mode 100644
index 0000000000..868c3c4e87
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_fpclassifyl.c
@@ -0,0 +1,44 @@
+/* Return classification value corresponding to argument.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+   		  Jakub Jelinek <jj@ultra.linux.cz>, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+int
+__fpclassifyl (long double x)
+{
+  u_int64_t hx, lx;
+  int retval = FP_NORMAL;
+
+  GET_LDOUBLE_WORDS64 (hx, lx, x);
+  lx |= (hx & 0x0000ffffffffffffLL);
+  hx &= 0x7fff000000000000LL;
+  if ((hx | lx) == 0)
+    retval = FP_ZERO;
+  else if (hx == 0)
+    retval = FP_SUBNORMAL;
+  else if (hx == 0x7fff000000000000LL)
+    retval = lx != 0 ? FP_NAN : FP_INFINITE;
+
+  return retval;
+}
diff --git a/sysdeps/ieee754/ldbl-128/s_frexpl.c b/sysdeps/ieee754/ldbl-128/s_frexpl.c
new file mode 100644
index 0000000000..6dbb60ece0
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_frexpl.c
@@ -0,0 +1,63 @@
+/* s_frexpl.c -- long double version of s_frexp.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * for non-zero x
+ *	x = frexpl(arg,&exp);
+ * return a long double fp quantity x such that 0.5 <= |x| <1.0
+ * and the corresponding binary exponent "exp". That is
+ *	arg = x*2^exp.
+ * If arg is inf, 0.0, or NaN, then frexpl(arg,&exp) returns arg
+ * with *exp=0.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double
+#else
+static long double
+#endif
+two114 = 2.0769187434139310514121985316880384E+34L; /* 0x4071000000000000, 0 */
+
+#ifdef __STDC__
+	long double __frexpl(long double x, int *eptr)
+#else
+	long double __frexpl(x, eptr)
+	long double x; int *eptr;
+#endif
+{
+	u_int64_t hx, lx, ix;
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	ix = 0x7fffffffffffffffULL&hx;
+	*eptr = 0;
+	if(ix>=0x7fff000000000000ULL||((ix|lx)==0)) return x;	/* 0,inf,nan */
+	if (ix<0x0001000000000000ULL) {		/* subnormal */
+	    x *= two114;
+	    GET_LDOUBLE_MSW64(hx,x);
+	    ix = hx&0x7fffffffffffffffULL;
+	    *eptr = -114;
+	}
+	*eptr += (ix>>48)-16382;
+	hx = (hx&0x8000ffffffffffffULL) | 0x3ffe000000000000ULL;
+	SET_LDOUBLE_MSW64(x,hx);
+	return x;
+}
+weak_alias (__frexpl, frexpl)
diff --git a/sysdeps/ieee754/ldbl-128/s_ilogbl.c b/sysdeps/ieee754/ldbl-128/s_ilogbl.c
new file mode 100644
index 0000000000..d2acfd3105
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_ilogbl.c
@@ -0,0 +1,55 @@
+/* s_ilogbl.c -- long double version of s_ilogb.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/* ilogbl(long double x)
+ * return the binary exponent of non-zero x
+ * ilogbl(0) = 0x80000001
+ * ilogbl(inf/NaN) = 0x7fffffff (no signal is raised)
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+	int __ilogbl(long double x)
+#else
+	int __ilogbl(x)
+	long double x;
+#endif
+{
+	int64_t hx,lx;
+	int ix;
+
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	hx &= 0x7fffffffffffffffLL;
+	if(hx <= 0x0001000000000000LL) {
+	    if((hx|lx)==0)
+		return FP_ILOGB0;	/* ilogbl(0) = FP_ILOGB0 */
+	    else			/* subnormal x */
+		if(hx==0) {
+		    for (ix = -16431; lx>0; lx<<=1) ix -=1;
+		} else {
+		    for (ix = -16382, hx<<=15; hx>0; hx<<=1) ix -=1;
+		}
+	    return ix;
+	}
+	else if (hx<0x7fff000000000000LL) return (hx>>48)-0x3fff;
+	else return FP_ILOGBNAN;
+}
+weak_alias (__ilogbl, ilogbl)
diff --git a/sysdeps/ieee754/ldbl-128/s_isinfl.c b/sysdeps/ieee754/ldbl-128/s_isinfl.c
new file mode 100644
index 0000000000..038c294c79
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_isinfl.c
@@ -0,0 +1,28 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Change for long double by Jakub Jelinek <jj@ultra.linux.cz>
+ * Public domain.
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * isinfl(x) returns 1 if x is inf, -1 if x is -inf, else 0;
+ * no branching!
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+int
+__isinfl (long double x)
+{
+	int64_t hx,lx;
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	lx |= (hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL;
+	lx |= -lx;
+	return ~(lx >> 63) & (hx >> 62);
+}
+weak_alias (__isinfl, isinfl)
diff --git a/sysdeps/libm-ieee754/w_sinhl.c b/sysdeps/ieee754/ldbl-128/s_isnanl.c
index 3e93cc598d..d2fb4038ce 100644
--- a/sysdeps/libm-ieee754/w_sinhl.c
+++ b/sysdeps/ieee754/ldbl-128/s_isnanl.c
@@ -1,6 +1,5 @@
-/* w_sinhl.c -- long double version of w_sinh.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
+/* s_isnanl.c -- long double version of s_isnan.c.
+ * Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
  */
 
 /*
@@ -19,29 +18,25 @@ static char rcsid[] = "$NetBSD: $";
 #endif
 
 /*
- * wrapper sinhl(x)
+ * isnanl(x) returns 1 is x is nan, else 0;
+ * no branching!
  */
 
 #include "math.h"
 #include "math_private.h"
 
 #ifdef __STDC__
-	long double __sinhl(long double x)	/* wrapper sinhl */
+	int __isnanl(long double x)
 #else
-	long double __sinhl(x)			/* wrapper sinhl */
+	int __isnanl(x)
 	long double x;
 #endif
 {
-#ifdef _IEEE_LIBM
-	return __ieee754_sinhl(x);
-#else
-	long double z;
-	z = __ieee754_sinhl(x);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if(!__finitel(z)&&__finitel(x)) {
-	    return __kernel_standard(x,x,225); /* sinh overflow */
-	} else
-	    return z;
-#endif
+	int64_t hx,lx;
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	hx &= 0x7fffffffffffffffLL;
+	hx |= (u_int64_t)(lx|(-lx))>>63;
+	hx = 0x7fff000000000000LL - hx;
+	return (int)((u_int64_t)hx>>63);
 }
-weak_alias (__sinhl, sinhl)
+weak_alias (__isnanl, isnanl)
diff --git a/sysdeps/ieee754/ldbl-128/s_llrintl.c b/sysdeps/ieee754/ldbl-128/s_llrintl.c
new file mode 100644
index 0000000000..389a65dc0e
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_llrintl.c
@@ -0,0 +1,75 @@
+/* Round argument to nearest integral value according to current rounding
+   direction.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+   		  Jakub Jelinek <jj@ultra.linux.cz>, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+static const long double two112[2] =
+{
+  5.19229685853482762853049632922009600E+33L, /* 0x406F000000000000, 0 */
+ -5.19229685853482762853049632922009600E+33L  /* 0xC06F000000000000, 0 */
+};
+
+long long int
+__llrintl (long double x)
+{
+  int32_t j0;
+  u_int64_t i0,i1;
+  volatile long double w;
+  long double t;
+  long long int result;
+  int sx;
+
+  GET_LDOUBLE_WORDS64 (i0, i1, x);
+  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+  sx = i0 >> 63;
+  i0 &= 0x0000ffffffffffffLL;
+  i0 |= 0x0001000000000000LL;
+
+  if (j0 < (int32_t) (8 * sizeof (long long int)) - 1)
+    {
+      if (j0 < -1)
+	return 0;
+      w = two112[sx] + x;
+      t = w - two112[sx];
+      GET_LDOUBLE_WORDS64 (i0, i1, x);
+      j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+      i0 &= 0x0000ffffffffffffLL;
+      i0 |= 0x0001000000000000LL;
+
+      if (j0 <= 48)
+	result = i0 >> (48 - j0);
+      else
+	result = ((long long int) i0 << (j0 - 48)) | (i1 >> (112 - j0));
+    }
+  else
+    {
+      /* The number is too large.  It is left implementation defined
+	 what happens.  */
+      return (long long int) x;
+    }
+
+  return sx ? -result : result;
+}
+
+weak_alias (__llrintl, llrintl)
diff --git a/sysdeps/ieee754/ldbl-128/s_llroundl.c b/sysdeps/ieee754/ldbl-128/s_llroundl.c
new file mode 100644
index 0000000000..82395a7b5a
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_llroundl.c
@@ -0,0 +1,74 @@
+/* Round long double value to long long int.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+   		  Jakub Jelinek <jj@ultra.linux.cz>, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+long long int
+__llroundl (long double x)
+{
+  int64_t j0;
+  u_int64_t i1, i0;
+  long long int result;
+  int sign;
+
+  GET_LDOUBLE_WORDS64 (i0, i1, x);
+  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+  sign = (i0 & 0x8000000000000000ULL) != 0 ? -1 : 1;
+  i0 &= 0x0000ffffffffffffLL;
+  i0 |= 0x0001000000000000LL;
+
+  if (j0 < 48)
+    {
+      if (j0 < 0)
+	return j0 < -1 ? 0 : sign;
+      else
+	{
+	  i0 += 0x0000800000000000LL >> j0;
+	  result = i0 >> (48 - j0);
+	}
+    }
+  else if (j0 < (int32_t) (8 * sizeof (long long int)) - 1)
+    {
+      if (j0 >= 112)
+	result = ((long long int) i0 << (j0 - 48)) | (i1 << (j0 - 112));
+      else
+	{
+	  u_int64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
+	  if (j < i1)
+	    ++i0;
+
+	  result = ((long long int) i0 << (j0 - 48)) | (j >> (112 - j0));
+	}
+    }
+  else
+    {
+      /* The number is too large.  It is left implementation defined
+	 what happens.  */
+      return (long long int) x;
+    }
+
+  return sign * result;
+}
+
+weak_alias (__llroundl, llroundl)
diff --git a/sysdeps/ieee754/ldbl-128/s_logbl.c b/sysdeps/ieee754/ldbl-128/s_logbl.c
new file mode 100644
index 0000000000..1fda289312
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_logbl.c
@@ -0,0 +1,46 @@
+/* s_logbl.c -- long double version of s_logb.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * long double logbl(x)
+ * IEEE 754 logb. Included to pass IEEE test suite. Not recommend.
+ * Use ilogb instead.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+	long double __logbl(long double x)
+#else
+	long double __logbl(x)
+	long double x;
+#endif
+{
+	int64_t lx,hx;
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	hx &= 0x7fffffffffffffffLL;		/* high |x| */
+	if((hx|lx)==0) return -1.0/fabs(x);
+	if(hx>=0x7fff000000000000LL) return x*x;
+	if((hx>>=48)==0) 			/* IEEE 754 logb */
+		return -16382.0;
+	else
+		return (long double) (hx-0x3fff);
+}
+weak_alias (__logbl, logbl)
diff --git a/sysdeps/ieee754/ldbl-128/s_lrintl.c b/sysdeps/ieee754/ldbl-128/s_lrintl.c
new file mode 100644
index 0000000000..434aa315a7
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_lrintl.c
@@ -0,0 +1,91 @@
+/* Round argument to nearest integral value according to current rounding
+   direction.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+   		  Jakub Jelinek <jj@ultra.linux.cz>, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+static const long double two112[2] =
+{
+  5.19229685853482762853049632922009600E+33L, /* 0x406F000000000000, 0 */
+ -5.19229685853482762853049632922009600E+33L  /* 0xC06F000000000000, 0 */
+};
+
+long int
+__lrintl (long double x)
+{
+  int32_t j0;
+  u_int64_t i0,i1;
+  volatile long double w;
+  long double t;
+  long int result;
+  int sx;
+
+  GET_LDOUBLE_WORDS64 (i0, i1, x);
+  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+  sx = i0 >> 63;
+  i0 &= 0x0000ffffffffffffLL;
+  i0 |= 0x0001000000000000LL;
+
+  if (j0 < 48)
+    {
+      if (j0 < -1)
+	return 0;
+      else
+	{
+	  w = two112[sx] + x;
+	  t = w - two112[sx];
+	  GET_LDOUBLE_WORDS64 (i0, i1, x);
+	  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+	  i0 &= 0x0000ffffffffffffLL;
+	  i0 |= 0x0001000000000000LL;
+
+	  result = i0 >> (48 - j0);
+	}
+    }
+  else if (j0 < (int32_t) (8 * sizeof (long int)) - 1)
+    {
+      if (j0 >= 112)
+	result = ((long int) i0 << (j0 - 48)) | (i1 << (j0 - 112));
+      else
+	{
+	  w = two112[sx] + x;
+	  t = w - two112[sx];
+	  GET_LDOUBLE_WORDS64 (i0, i1, x);
+	  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+	  i0 &= 0x0000ffffffffffffLL;
+	  i0 |= 0x0001000000000000LL;
+
+	  result = ((long int) i0 << (j0 - 48)) | (i1 >> (112 - j0));
+	}
+    }
+  else
+    {
+      /* The number is too large.  It is left implementation defined
+	 what happens.  */
+      return (long int) x;
+    }
+
+  return sx ? -result : result;
+}
+
+weak_alias (__lrintl, lrintl)
diff --git a/sysdeps/ieee754/ldbl-128/s_lroundl.c b/sysdeps/ieee754/ldbl-128/s_lroundl.c
new file mode 100644
index 0000000000..ea82f4c3f8
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_lroundl.c
@@ -0,0 +1,74 @@
+/* Round long double value to long int.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+   		  Jakub Jelinek <jj@ultra.linux.cz>, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+long int
+__lroundl (long double x)
+{
+  int64_t j0;
+  u_int64_t i1, i0;
+  long int result;
+  int sign;
+
+  GET_LDOUBLE_WORDS64 (i0, i1, x);
+  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+  sign = (i0 & 0x8000000000000000ULL) != 0 ? -1 : 1;
+  i0 &= 0x0000ffffffffffffLL;
+  i0 |= 0x0001000000000000LL;
+
+  if (j0 < 48)
+    {
+      if (j0 < 0)
+	return j0 < -1 ? 0 : sign;
+      else
+	{
+	  i0 += 0x0000800000000000LL >> j0;
+	  result = i0 >> (48 - j0);
+	}
+    }
+  else if (j0 < (int32_t) (8 * sizeof (long int)) - 1)
+    {
+      if (j0 >= 112)
+	result = ((long int) i0 << (j0 - 48)) | (i1 << (j0 - 112));
+      else
+	{
+	  u_int64_t j = i1 + (0x8000000000000000ULL >> (j0 - 48));
+	  if (j < i1)
+	    ++i0;
+
+	  result = ((long int) i0 << (j0 - 48)) | (j >> (112 - j0));
+	}
+    }
+  else
+    {
+      /* The number is too large.  It is left implementation defined
+	 what happens.  */
+      return (long int) x;
+    }
+
+  return sign * result;
+}
+
+weak_alias (__lroundl, lroundl)
diff --git a/sysdeps/ieee754/ldbl-128/s_modfl.c b/sysdeps/ieee754/ldbl-128/s_modfl.c
new file mode 100644
index 0000000000..63d66e7114
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_modfl.c
@@ -0,0 +1,88 @@
+/* s_modfl.c -- long double version of s_modf.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * modfl(long double x, long double *iptr)
+ * return fraction part of x, and return x's integral part in *iptr.
+ * Method:
+ *	Bit twiddling.
+ *
+ * Exception:
+ *	No exception.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double one = 1.0;
+#else
+static long double one = 1.0;
+#endif
+
+#ifdef __STDC__
+	long double __modfl(long double x, long double *iptr)
+#else
+	long double __modfl(x, iptr)
+	long double x,*iptr;
+#endif
+{
+	int64_t i0,i1,j0;
+	u_int64_t i;
+	GET_LDOUBLE_WORDS64(i0,i1,x);
+	j0 = ((i0>>48)&0x7fff)-0x3fff;	/* exponent of x */
+	if(j0<48) {			/* integer part in high x */
+	    if(j0<0) {			/* |x|<1 */
+		/* *iptr = +-0 */
+	        SET_LDOUBLE_WORDS64(*iptr,i0&0x8000000000000000ULL,0);
+		return x;
+	    } else {
+		i = (0x0000ffffffffffffLL)>>j0;
+		if(((i0&i)|i1)==0) {		/* x is integral */
+		    *iptr = x;
+		    /* return +-0 */
+		    SET_LDOUBLE_WORDS64(x,i0&0x8000000000000000ULL,0);
+		    return x;
+		} else {
+		    SET_LDOUBLE_WORDS64(*iptr,i0&(~i),0);
+		    return x - *iptr;
+		}
+	    }
+	} else if (j0>111) {		/* no fraction part */
+	    *iptr = x*one;
+	    /* We must handle NaNs separately.  */
+	    if (j0 == 0x4000 && ((i0 & 0x0000ffffffffffffLL) | i1))
+	      return x*one;
+	    /* return +-0 */
+	    SET_LDOUBLE_WORDS64(x,i0&0x8000000000000000ULL,0);
+	    return x;
+	} else {			/* fraction part in low x */
+	    i = -1ULL>>(j0-48);
+	    if((i1&i)==0) { 		/* x is integral */
+		*iptr = x;
+		/* return +-0 */
+		SET_LDOUBLE_WORDS64(x,i0&0x8000000000000000ULL,0);
+		return x;
+	    } else {
+		SET_LDOUBLE_WORDS64(*iptr,i0,i1&(~i));
+		return x - *iptr;
+	    }
+	}
+}
+weak_alias (__modfl, modfl)
diff --git a/sysdeps/ieee754/ldbl-128/s_nearbyintl.c b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
new file mode 100644
index 0000000000..bea3183d39
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
@@ -0,0 +1,93 @@
+/* s_nearbyintl.c -- long double version of s_nearbyint.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * nearbyintl(x)
+ * Return x rounded to integral value according to the prevailing
+ * rounding mode.
+ * Method:
+ *	Using floating addition.
+ * Exception:
+ *	Inexact flag raised if x not equal to rintl(x).
+ */
+
+#include <fenv.h>
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double
+#else
+static long double
+#endif
+TWO112[2]={
+  5.19229685853482762853049632922009600E+33L, /* 0x406F000000000000, 0 */
+ -5.19229685853482762853049632922009600E+33L  /* 0xC06F000000000000, 0 */
+};
+
+#ifdef __STDC__
+	long double __nearbyintl(long double x)
+#else
+	long double __nearbyintl(x)
+	long double x;
+#endif
+{
+	fenv_t env;
+	int64_t i0,j0,sx;
+	u_int64_t i,i1;
+	long double w,t;
+	GET_LDOUBLE_WORDS64(i0,i1,x);
+	sx = (((u_int64_t)i0)>>63);
+	j0 = ((i0>>48)&0x7fff)-0x3fff;
+	if(j0<48) {
+	    if(j0<0) {
+		if(((i0&0x7fffffffffffffffLL)|i1)==0) return x;
+		i1 |= (i0&0x0000ffffffffffffLL);
+		i0 &= 0xffffe00000000000ULL;
+		i0 |= ((i1|-i1)>>16)&0x0000800000000000LL;
+		SET_LDOUBLE_MSW64(x,i0);
+		feholdexcept (&env);
+	        w = TWO112[sx]+x;
+	        t = w-TWO112[sx];
+	        fesetenv (&env);
+		GET_LDOUBLE_MSW64(i0,t);
+		SET_LDOUBLE_MSW64(t,(i0&0x7fffffffffffffffLL)|(sx<<63));
+	        return t;
+	    } else {
+		i = (0x0000ffffffffffffLL)>>j0;
+		if(((i0&i)|i1)==0) return x; /* x is integral */
+		i>>=1;
+		if(((i0&i)|i1)!=0) {
+		    if(j0==47) i1 = 0x4000000000000000ULL; else
+		    i0 = (i0&(~i))|((0x0000200000000000LL)>>j0);
+		}
+	    }
+	} else if (j0>111) {
+	    if(j0==0x4000) return x+x;	/* inf or NaN */
+	    else return x;		/* x is integral */
+	} else {
+	    i = -1ULL>>(j0-48);
+	    if((i1&i)==0) return x;	/* x is integral */
+	    i>>=1;
+	    if((i1&i)!=0) i1 = (i1&(~i))|((0x4000000000000000LL)>>(j0-48));
+	}
+	SET_LDOUBLE_WORDS64(x,i0,i1);
+	feholdexcept (&env);
+	w = TWO112[sx]+x;
+	t = w-TWO112[sx];
+	fesetenv (&env);
+	return t;
+}
+weak_alias (__nearbyintl, nearbyintl)
diff --git a/sysdeps/ieee754/ldbl-128/s_nextafterl.c b/sysdeps/ieee754/ldbl-128/s_nextafterl.c
new file mode 100644
index 0000000000..d3df668178
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_nextafterl.c
@@ -0,0 +1,85 @@
+/* s_nextafterl.c -- long double version of s_nextafter.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/* IEEE functions
+ *	nextafterl(x,y)
+ *	return the next machine floating-point number of x in the
+ *	direction toward y.
+ *   Special cases:
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+	long double __nextafterl(long double x, long double y)
+#else
+	long double __nextafterl(x,y)
+	long double x,y;
+#endif
+{
+	int64_t hx,hy,ix,iy;
+	u_int64_t lx,ly;
+
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+	GET_LDOUBLE_WORDS64(hy,ly,y);
+	ix = hx&0x7fffffffffffffffLL;		/* |x| */
+	iy = hy&0x7fffffffffffffffLL;		/* |y| */
+
+	if(((ix>=0x7fff000000000000LL)&&((ix-0x7fff000000000000LL)|lx)!=0) ||   /* x is nan */
+	   ((iy>=0x7fff000000000000LL)&&((iy-0x7fff000000000000LL)|ly)!=0))     /* y is nan */
+	   return x+y;
+	if(x==y) return y;		/* x=y, return y */
+	if((ix|lx)==0) {			/* x == 0 */
+	    SET_LDOUBLE_WORDS64(x,hy&0x8000000000000000ULL,1);/* return +-minsubnormal */
+	    y = x*x;
+	    if(y==x) return y; else return x;	/* raise underflow flag */
+	}
+	if(hx>=0) {			/* x > 0 */
+	    if(hx>hy||((hx==hy)&&(lx>ly))) {	/* x > y, x -= ulp */
+		if(lx==0) hx--;
+		lx--;
+	    } else {				/* x < y, x += ulp */
+		lx++;
+		if(lx==0) hx++;
+	    }
+	} else {				/* x < 0 */
+	    if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){/* x < y, x -= ulp */
+		if(lx==0) hx--;
+		lx--;
+	    } else {				/* x > y, x += ulp */
+		lx++;
+		if(lx==0) hx++;
+	    }
+	}
+	hy = hx&0x7fff000000000000LL;
+	if(hy==0x7fff000000000000LL) return x+x;/* overflow  */
+	if(hy==0) {				/* underflow */
+	    y = x*x;
+	    if(y!=x) {		/* raise underflow flag */
+	        SET_LDOUBLE_WORDS64(y,hx,lx);
+		return y;
+	    }
+	}
+	SET_LDOUBLE_WORDS64(x,hx,lx);
+	return x;
+}
+weak_alias (__nextafterl, nextafterl)
+strong_alias (__nextafterl, __nexttowardl)
+weak_alias (__nextafterl, nexttowardl)
diff --git a/sysdeps/ieee754/ldbl-128/s_nexttoward.c b/sysdeps/ieee754/ldbl-128/s_nexttoward.c
new file mode 100644
index 0000000000..f121be2fac
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_nexttoward.c
@@ -0,0 +1,97 @@
+/* s_nexttoward.c
+ * Conversion from s_nextafter.c by Ulrich Drepper, Cygnus Support,
+ * drepper@cygnus.com and Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/* IEEE functions
+ *	nexttoward(x,y)
+ *	return the next machine floating-point number of x in the
+ *	direction toward y.
+ *   Special cases:
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+	double __nexttoward(double x, long double y)
+#else
+	double __nexttoward(x,y)
+	double x;
+	long double y;
+#endif
+{
+	int32_t hx,ix;
+	int64_t hy,iy;
+	u_int32_t lx;
+	u_int64_t ly;
+
+	EXTRACT_WORDS(hx,lx,x);
+	GET_LDOUBLE_WORDS64(hy,ly,y);
+	ix = hx&0x7fffffff;		/* |x| */
+	iy = hy&0x7fffffffffffffffLL;	/* |y| */
+
+	if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) ||   /* x is nan */
+	   ((iy>=0x7fff000000000000LL)&&((iy-0x7fff000000000000LL)|ly)!=0))
+	   						    /* y is nan */
+	   return x+y;
+	if((long double) x==y) return x;	/* x=y, return x */
+	if((ix|lx)==0) {			/* x == 0 */
+	    double x2;
+	    INSERT_WORDS(x,(u_int32_t)((hy>>32)&0x80000000),1);/* return +-minsub */
+	    x2 = x*x;
+	    if(x2==x) return x2; else return x;	/* raise underflow flag */
+	}
+	if(hx>=0) {				/* x > 0 */
+	    if (hy<0||(ix>>20)>(iy>>48)-0x3c00
+		|| ((ix>>20)==(iy>>48)-0x3c00
+		    && (((((int64_t)hx)<<28)|(lx>>4))>(hy&0x0000ffffffffffffLL)
+			|| (((((int64_t)hx)<<28)|(lx>>4))==(hy&0x0000ffffffffffffLL)
+			    && (lx&0xf)>(ly>>60))))) {	/* x > y, x -= ulp */
+		if(lx==0) hx -= 1;
+		lx -= 1;
+	    } else {				/* x < y, x += ulp */
+		lx += 1;
+		if(lx==0) hx += 1;
+	    }
+	} else {				/* x < 0 */
+	    if (hy>=0||(ix>>20)>(iy>>48)-0x3c00
+		|| ((ix>>20)==(iy>>48)-0x3c00
+		    && (((((int64_t)hx)<<28)|(lx>>4))>(hy&0x0000ffffffffffffLL)
+			|| (((((int64_t)hx)<<28)|(lx>>4))==(hy&0x0000ffffffffffffLL)
+			    && (lx&0xf)>(ly>>60))))) {	/* x < y, x -= ulp */
+		if(lx==0) hx -= 1;
+		lx -= 1;
+	    } else {				/* x > y, x += ulp */
+		lx += 1;
+		if(lx==0) hx += 1;
+	    }
+	}
+	hy = hx&0x7ff00000;
+	if(hy>=0x7ff00000) return x+x;	/* overflow  */
+	if(hy<0x00100000) {		/* underflow */
+	    double x2 = x*x;
+	    if(x2!=x) {		/* raise underflow flag */
+	        INSERT_WORDS(x2,hx,lx);
+		return x2;
+	    }
+	}
+	INSERT_WORDS(x,hx,lx);
+	return x;
+}
+weak_alias (__nexttoward, nexttoward)
diff --git a/sysdeps/ieee754/ldbl-128/s_nexttowardf.c b/sysdeps/ieee754/ldbl-128/s_nexttowardf.c
new file mode 100644
index 0000000000..1a22e0102c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_nexttowardf.c
@@ -0,0 +1,81 @@
+/* s_nexttowardf.c -- float version of s_nextafter.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com
+ * and Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+	float __nexttowardf(float x, long double y)
+#else
+	float __nexttowardf(x,y)
+	float x;
+	long double y;
+#endif
+{
+	int32_t hx,ix;
+	int64_t hy,iy;
+	u_int64_t ly;
+                                
+	GET_FLOAT_WORD(hx,x);
+	GET_LDOUBLE_WORDS64(hy,ly,y);
+	ix = hx&0x7fffffff;		/* |x| */
+	iy = hy&0x7fffffffffffffffLL;	/* |y| */
+
+	if((ix>0x7f800000) ||   /* x is nan */
+	   ((iy>=0x7fff000000000000LL)&&((iy-0x7fff000000000000LL)|ly)!=0))
+				/* y is nan */
+	   return x+y;
+	if((long double) x==y) return y;	/* x=y, return y */
+	if(ix==0) {				/* x == 0 */
+	    float x2;
+	    SET_FLOAT_WORD(x,(u_int32_t)((hy>>32)&0x80000000)|1);/* return +-minsub*/
+	    x2 = x*x;
+	    if(x2==x) return x2; else return x;	/* raise underflow flag */
+	}
+	if(hx>=0) {				/* x > 0 */
+	    if(hy<0||(ix>>23)>(iy>>48)-0x3f80
+	       || ((ix>>23)==(iy>>48)-0x3f80
+		   && (ix&0x7fffff)>((hy>>25)&0x7fffff))) {/* x > y, x -= ulp */
+		hx -= 1;
+	    } else {				/* x < y, x += ulp */
+		hx += 1;
+	    }
+	} else {				/* x < 0 */
+	    if(hy>=0||(ix>>23)>(iy>>48)-0x3f80
+	       || ((ix>>23)==(iy>>48)-0x3f80
+		   && (ix&0x7fffff)>((hy>>25)&0x7fffff))) {/* x < y, x -= ulp */
+		hx -= 1;
+	    } else {				/* x > y, x += ulp */
+		hx += 1;
+	    }
+	}
+	hy = hx&0x7f800000;
+	if(hy>=0x7f800000) return x+x;	/* overflow  */
+	if(hy<0x00800000) {		/* underflow */
+	    float x2 = x*x;
+	    if(x2!=x) {		/* raise underflow flag */
+	        SET_FLOAT_WORD(x2,hx);
+		return x2;
+	    }
+	}
+	SET_FLOAT_WORD(x,hx);
+	return x;
+}
+weak_alias (__nexttowardf, nexttowardf)
diff --git a/sysdeps/ieee754/ldbl-128/s_remquol.c b/sysdeps/ieee754/ldbl-128/s_remquol.c
new file mode 100644
index 0000000000..0d2695844b
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_remquol.c
@@ -0,0 +1,110 @@
+/* Compute remainder and a congruent to the quotient.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+		  Jakub Jelinek <jj@ultra.linux.cz>, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+static const long double zero = 0.0;
+
+
+long double
+__remquol (long double x, long double y, int *quo)
+{
+  int64_t hx,hy;
+  u_int64_t sx,lx,ly;
+  int cquo,qs;
+
+  GET_LDOUBLE_WORDS64 (hx, lx, x);
+  GET_LDOUBLE_WORDS64 (hy, ly, y);
+  sx = hx & 0x8000000000000000ULL;
+  qs = sx ^ (hy & 0x8000000000000000ULL);
+  hy &= 0x7fffffffffffffffLL;
+  hx &= 0x7fffffffffffffffLL;
+
+  /* Purge off exception values.  */
+  if ((hy | ly) == 0)
+    return (x * y) / (x * y); 			/* y = 0 */
+  if ((hx >= 0x7fff000000000000LL)		/* x not finite */
+      || ((hy >= 0x7fff000000000000LL)		/* y is NaN */
+	  && (((hy - 0x7fff000000000000LL) | ly) != 0)))
+    return (x * y) / (x * y);
+
+  if (hy <= 0x7ffbffffffffffffLL)
+    x = __ieee754_fmodl (x, 8 * y);              /* now x < 8y */
+      
+  if (((hx - hy) | (lx - ly)) == 0)
+    {
+      *quo = qs ? -1 : 1;
+      return zero * x;
+    }
+
+  x  = fabsl (x);
+  y  = fabsl (y);
+  cquo = 0;
+
+  if (x >= 4 * y)
+    {
+      x -= 4 * y;
+      cquo += 4;
+    }
+  if (x >= 2 * y)
+    {
+      x -= 2 * y;
+      cquo += 2;
+    }
+
+  if (hy < 0x0002000000000000LL)
+    {
+      if (x + x > y)
+	{
+	  x -= y;
+	  ++cquo;
+	  if (x + x >= y)
+	    {
+	      x -= y;
+	      ++cquo;
+	    }
+	}
+    }
+  else
+    {
+      long double y_half = 0.5L * y;
+      if (x > y_half)
+	{
+	  x -= y;
+	  ++cquo;
+	  if (x >= y_half)
+	    {
+	      x -= y;
+	      ++cquo;
+	    }
+	}
+    }
+
+  *quo = qs ? -cquo : cquo;
+
+  if (sx)
+    x = -x;
+  return x;
+}
+weak_alias (__remquol, remquol)
diff --git a/sysdeps/ieee754/ldbl-128/s_rintl.c b/sysdeps/ieee754/ldbl-128/s_rintl.c
new file mode 100644
index 0000000000..c3fc3ba193
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_rintl.c
@@ -0,0 +1,90 @@
+/* s_rintl.c -- long double version of s_rint.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * rintl(x)
+ * Return x rounded to integral value according to the prevailing
+ * rounding mode.
+ * Method:
+ *	Using floating addition.
+ * Exception:
+ *	Inexact flag raised if x not equal to rintl(x).
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double
+#else
+static long double
+#endif
+TWO112[2]={
+  5.19229685853482762853049632922009600E+33L, /* 0x406F000000000000, 0 */
+ -5.19229685853482762853049632922009600E+33L  /* 0xC06F000000000000, 0 */
+};
+
+#ifdef __STDC__
+	long double __rintl(long double x)
+#else
+	long double __rintl(x)
+	long double x;
+#endif
+{
+	int64_t i0,j0,sx;
+	u_int64_t i,i1;
+	long double w,t;
+	GET_LDOUBLE_WORDS64(i0,i1,x);
+	sx = (((u_int64_t)i0)>>63);
+	j0 = ((i0>>48)&0x7fff)-0x3fff;
+	if(j0<48) {
+	    if(j0<0) {
+		if(((i0&0x7fffffffffffffffLL)|i1)==0) return x;
+		i1 |= (i0&0x0000ffffffffffffLL);
+		i0 &= 0xffffe00000000000ULL;
+		i0 |= ((i1|-i1)>>16)&0x0000800000000000LL;
+		SET_LDOUBLE_MSW64(x,i0);
+	        w = TWO112[sx]+x;
+	        t = w-TWO112[sx];
+		GET_LDOUBLE_MSW64(i0,t);
+		SET_LDOUBLE_MSW64(t,(i0&0x7fffffffffffffffLL)|(sx<<63));
+	        return t;
+	    } else {
+		i = (0x0000ffffffffffffLL)>>j0;
+		if(((i0&i)|i1)==0) return x; /* x is integral */
+		i>>=1;
+		if(((i0&i)|i1)!=0) {
+		    if(j0==47) i1 = 0x4000000000000000ULL; else
+		    i0 = (i0&(~i))|((0x0000200000000000LL)>>j0);
+		}
+	    }
+	} else if (j0>111) {
+	    if(j0==0x4000) return x+x;	/* inf or NaN */
+	    else return x;		/* x is integral */
+	} else {
+	    i = -1ULL>>(j0-48);
+	    if((i1&i)==0) return x;	/* x is integral */
+	    i>>=1;
+	    if((i1&i)!=0) i1 = (i1&(~i))|((0x4000000000000000LL)>>(j0-48));
+	}
+	SET_LDOUBLE_WORDS64(x,i0,i1);
+	w = TWO112[sx]+x;
+	return w-TWO112[sx];
+}
+weak_alias (__rintl, rintl)
diff --git a/sysdeps/ieee754/ldbl-128/s_roundl.c b/sysdeps/ieee754/ldbl-128/s_roundl.c
new file mode 100644
index 0000000000..f9fff48f6c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_roundl.c
@@ -0,0 +1,94 @@
+/* Round long double to integer away from zero.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+		  Jakub Jelinek <jj@ultra.linux.cz>, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+static const long double huge = 1.0E4930L;
+
+
+long double
+__roundl (long double x)
+{
+  int32_t j0;
+  u_int64_t se, i1, i0;
+
+  GET_LDOUBLE_WORDS64 (i0, i1, x);
+  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+  if (j0 < 31)
+    {
+      if (j0 < 0)
+	{
+	  if (huge + x > 0.0)
+	    {
+	      i0 &= 0x8000000000000000ULL;
+	      if (j0 == -1)
+		i0 |= 0x3fff000000000000LL;
+	      i1 = 0;
+	    }
+	}
+      else
+	{
+	  u_int64_t i = 0x0000ffffffffffffLL >> j0;
+	  if (((i0 & i) | i1) == 0)
+	    /* X is integral.  */
+	    return x;
+	  if (huge + x > 0.0)
+	    {
+	      /* Raise inexact if x != 0.  */
+	      i0 += 0x0000800000000000LL >> j0;
+	      i0 &= ~i;
+	      i1 = 0;
+	    }
+	}
+    }
+  else if (j0 > 111)
+    {
+      if (j0 == 0x4000)
+	/* Inf or NaN.  */
+	return x + x;
+      else
+	return x;
+    }
+  else
+    {
+      u_int64_t i = -1ULL >> (j0 - 48);
+      if ((i1 & i) == 0)
+	/* X is integral.  */
+	return x;
+
+      if (huge + x > 0.0)
+	{
+	  /* Raise inexact if x != 0.  */
+	  u_int64_t j = i1 + (1LL << (111 - j0));
+	  if (j < i1)
+	    i0 += 1;
+	  i1 = j;
+	}
+      i1 &= ~i;
+    }
+
+  SET_LDOUBLE_WORDS64 (x, i0, i1);
+  return x;
+}
+weak_alias (__roundl, roundl)
diff --git a/sysdeps/ieee754/ldbl-128/s_scalblnl.c b/sysdeps/ieee754/ldbl-128/s_scalblnl.c
new file mode 100644
index 0000000000..5e8b58b733
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_scalblnl.c
@@ -0,0 +1,70 @@
+/* s_scalblnl.c -- long double version of s_scalbn.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+   
+/* @(#)s_scalbn.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * scalblnl (long double x, long int n)
+ * scalblnl(x,n) returns x* 2**n  computed by  exponent
+ * manipulation rather than by actually performing an
+ * exponentiation or a multiplication.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double
+#else
+static long double
+#endif
+two114 = 2.0769187434139310514121985316880384E+34L, /* 0x4071000000000000, 0 */
+twom114 = 4.8148248609680896326399448564623183E-35L, /* 0x3F8D000000000000, 0 */
+huge   = 1.0E+4900L,
+tiny   = 1.0E-4900L;
+
+#ifdef __STDC__
+	long double __scalblnl (long double x, long int n)
+#else
+	long double __scalblnl (x,n)
+	long double x; long int n;
+#endif
+{
+	int64_t k,hx,lx;
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+        k = (hx>>48)&0x7fff;		/* extract exponent */
+        if (k==0) {				/* 0 or subnormal x */
+            if ((lx|(hx&0x7fffffffffffffffULL))==0) return x; /* +-0 */
+	    x *= two114;
+	    GET_LDOUBLE_MSW64(hx,x);
+	    k = ((hx>>48)&0x7fff) - 114;
+	}
+        if (k==0x7fff) return x+x;		/* NaN or Inf */
+        k = k+n;
+        if (n> 50000 || k > 0x7ffe)
+	  return huge*__copysignl(huge,x); /* overflow  */
+	if (n< -50000) return tiny*__copysignl(tiny,x); /*underflow*/
+        if (k > 0) 				/* normal result */
+	    {SET_LDOUBLE_MSW64(x,(hx&0x8000ffffffffffffULL)|(k<<48)); return x;}
+        if (k <= -114)
+	  return tiny*__copysignl(tiny,x); 	/*underflow*/
+        k += 114;				/* subnormal result */
+	SET_LDOUBLE_MSW64(x,(hx&0x8000ffffffffffffULL)|(k<<48));
+        return x*twom114;
+}
+weak_alias (__scalblnl, scalblnl)
diff --git a/sysdeps/ieee754/ldbl-128/s_scalbnl.c b/sysdeps/ieee754/ldbl-128/s_scalbnl.c
new file mode 100644
index 0000000000..c54f064c0c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_scalbnl.c
@@ -0,0 +1,70 @@
+/* s_scalbnl.c -- long double version of s_scalbn.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+   
+/* @(#)s_scalbn.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * scalbnl (long double x, int n)
+ * scalbnl(x,n) returns x* 2**n  computed by  exponent
+ * manipulation rather than by actually performing an
+ * exponentiation or a multiplication.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+static const long double
+#else
+static long double
+#endif
+two114 = 2.0769187434139310514121985316880384E+34L, /* 0x4071000000000000, 0 */
+twom114 = 4.8148248609680896326399448564623183E-35L, /* 0x3F8D000000000000, 0 */
+huge   = 1.0E+4900L,
+tiny   = 1.0E-4900L;
+
+#ifdef __STDC__
+	long double __scalbnl (long double x, int n)
+#else
+	long double __scalbnl (x,n)
+	long double x; int n;
+#endif
+{
+	int64_t k,hx,lx;
+	GET_LDOUBLE_WORDS64(hx,lx,x);
+        k = (hx>>48)&0x7fff;		/* extract exponent */
+        if (k==0) {				/* 0 or subnormal x */
+            if ((lx|(hx&0x7fffffffffffffffULL))==0) return x; /* +-0 */
+	    x *= two114;
+	    GET_LDOUBLE_MSW64(hx,x);
+	    k = ((hx>>48)&0x7fff) - 114;
+	}
+        if (k==0x7fff) return x+x;		/* NaN or Inf */
+        k = k+n;
+        if (n> 50000 || k > 0x7ffe)
+	  return huge*__copysignl(huge,x); /* overflow  */
+	if (n< -50000) return tiny*__copysignl(tiny,x); /*underflow*/
+        if (k > 0) 				/* normal result */
+	    {SET_LDOUBLE_MSW64(x,(hx&0x8000ffffffffffffULL)|(k<<48)); return x;}
+        if (k <= -114)
+	  return tiny*__copysignl(tiny,x); 	/*underflow*/
+        k += 114;				/* subnormal result */
+	SET_LDOUBLE_MSW64(x,(hx&0x8000ffffffffffffULL)|(k<<48));
+        return x*twom114;
+}
+weak_alias (__scalbnl, scalbnl)
diff --git a/sysdeps/ieee754/ldbl-128/s_signbitl.c b/sysdeps/ieee754/ldbl-128/s_signbitl.c
new file mode 100644
index 0000000000..52a0afbe6a
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_signbitl.c
@@ -0,0 +1,32 @@
+/* Return nonzero value if number is negative.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+int
+__signbitl (long double x)
+{
+  int64_t e;
+
+  GET_LDOUBLE_MSW64 (e, x);
+  return e < 0;
+}
diff --git a/sysdeps/ieee754/ldbl-128/s_sincosl.c b/sysdeps/ieee754/ldbl-128/s_sincosl.c
new file mode 100644
index 0000000000..2d74e72a50
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_sincosl.c
@@ -0,0 +1,77 @@
+/* Compute sine and cosine of argument.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+		  Jakub Jelinek <jj@ultra.linux.cz>.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+/* Note: We should probably introduce __kernel_sincosl to speed things up,
+   because __kernel_{cos,sin}l sometimes compute both sine and cosine.  */
+
+void
+__sincosl (long double x, long double *sinx, long double *cosx)
+{
+  int64_t ix;
+
+  /* High word of x. */
+  GET_LDOUBLE_MSW64 (ix, x);
+
+  /* |x| ~< pi/4 */
+  ix &= 0x7fffffffffffffffLL;
+  if (ix <= 0x3ffe921fb54442d1LL)
+    {
+      *sinx = __kernel_sinl (x, 0.0, 0);
+      *cosx = __kernel_cosl (x, 0.0);
+    }
+  else if (ix >= 0x7fff000000000000LL)
+    {
+      /* sin(Inf or NaN) is NaN */
+      *sinx = *cosx = x - x;
+    }
+  else
+    {
+      /* Argument reduction needed.  */
+      long double y[2];
+      int n;
+
+      n = __ieee754_rem_pio2l (x, y);
+      switch (n & 3)
+	{
+	case 0:
+	  *sinx = __kernel_sinl (y[0], y[1], 1);
+	  *cosx = __kernel_cosl (y[0], y[1]);
+	  break;
+	case 1:
+	  *sinx = __kernel_cosl (y[0], y[1]);
+	  *cosx = -__kernel_sinl (y[0], y[1], 1);
+	  break;
+	case 2:
+	  *sinx = -__kernel_sinl (y[0], y[1], 1);
+	  *cosx = -__kernel_cosl (y[0], y[1]);
+	  break;
+	default:
+	  *sinx = -__kernel_cosl (y[0], y[1]);
+	  *cosx = __kernel_sinl (y[0], y[1], 1);
+	  break;
+	}
+    }
+}
+weak_alias (__sincosl, sincosl)
diff --git a/sysdeps/ieee754/ldbl-128/s_sinl.c b/sysdeps/ieee754/ldbl-128/s_sinl.c
new file mode 100644
index 0000000000..446a75f126
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_sinl.c
@@ -0,0 +1,83 @@
+/* s_sinl.c -- long double version of s_sin.c.
+ * Conversion to long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* sinl(x)
+ * Return sine function of x.
+ *
+ * kernel function:
+ *	__kernel_sinl		... sine function on [-pi/4,pi/4]
+ *	__kernel_cosl		... cose function on [-pi/4,pi/4]
+ *	__ieee754_rem_pio2l	... argument reduction routine
+ *
+ * Method.
+ *      Let S,C and T denote the sin, cos and tan respectively on
+ *	[-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
+ *	in [-pi/4 , +pi/4], and let n = k mod 4.
+ *	We have
+ *
+ *          n        sin(x)      cos(x)        tan(x)
+ *     ----------------------------------------------------------
+ *	    0	       S	   C		 T
+ *	    1	       C	  -S		-1/T
+ *	    2	      -S	  -C		 T
+ *	    3	      -C	   S		-1/T
+ *     ----------------------------------------------------------
+ *
+ * Special cases:
+ *      Let trig be any of sin, cos, or tan.
+ *      trig(+-INF)  is NaN, with signals;
+ *      trig(NaN)    is that NaN;
+ *
+ * Accuracy:
+ *	TRIG(x) returns trig(x) nearly rounded
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+	long double __sinl(long double x)
+#else
+	long double __sinl(x)
+	long double x;
+#endif
+{
+	long double y[2],z=0.0L;
+	int64_t n, ix;
+
+    /* High word of x. */
+	GET_LDOUBLE_MSW64(ix,x);
+
+    /* |x| ~< pi/4 */
+	ix &= 0x7fffffffffffffffLL;
+	if(ix <= 0x3ffe921fb54442d1LL)
+	  return __kernel_sinl(x,z,0);
+
+    /* sin(Inf or NaN) is NaN */
+	else if (ix>=0x7fff000000000000LL) return x-x;
+
+    /* argument reduction needed */
+	else {
+	    n = __ieee754_rem_pio2l(x,y);
+	    switch(n&3) {
+		case 0: return  __kernel_sinl(y[0],y[1],1);
+		case 1: return  __kernel_cosl(y[0],y[1]);
+		case 2: return -__kernel_sinl(y[0],y[1],1);
+		default:
+			return -__kernel_cosl(y[0],y[1]);
+	    }
+	}
+}
+weak_alias (__sinl, sinl)
diff --git a/sysdeps/ieee754/ldbl-128/s_tanl.c b/sysdeps/ieee754/ldbl-128/s_tanl.c
new file mode 100644
index 0000000000..ea9d053d9b
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_tanl.c
@@ -0,0 +1,77 @@
+/* s_tanl.c -- long double version of s_tan.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
+ */
+  
+/* @(#)s_tan.c 5.1 93/09/24 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* tanl(x)
+ * Return tangent function of x.
+ *
+ * kernel function:
+ *	__kernel_tanl		... tangent function on [-pi/4,pi/4]
+ *	__ieee754_rem_pio2l	... argument reduction routine
+ *
+ * Method.
+ *      Let S,C and T denote the sin, cos and tan respectively on
+ *	[-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
+ *	in [-pi/4 , +pi/4], and let n = k mod 4.
+ *	We have
+ *
+ *          n        sin(x)      cos(x)        tan(x)
+ *     ----------------------------------------------------------
+ *	    0	       S	   C		 T
+ *	    1	       C	  -S		-1/T
+ *	    2	      -S	  -C		 T
+ *	    3	      -C	   S		-1/T
+ *     ----------------------------------------------------------
+ *
+ * Special cases:
+ *      Let trig be any of sin, cos, or tan.
+ *      trig(+-INF)  is NaN, with signals;
+ *      trig(NaN)    is that NaN;
+ *
+ * Accuracy:
+ *	TRIG(x) returns trig(x) nearly rounded
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+	long double __tanl(long double x)
+#else
+	long double __tanl(x)
+	long double x;
+#endif
+{
+	long double y[2],z=0.0L;
+	int64_t n, ix;
+
+    /* High word of x. */
+	GET_LDOUBLE_MSW64(ix,x);
+
+    /* |x| ~< pi/4 */
+	ix &= 0x7fffffffffffffffLL;
+	if(ix <= 0x3ffe921fb54442d1LL) return __kernel_tanl(x,z,1);
+
+    /* tanl(Inf or NaN) is NaN */
+	else if (ix>=0x7fff000000000000LL) return x-x;		/* NaN */
+
+    /* argument reduction needed */
+	else {
+	    n = __ieee754_rem_pio2l(x,y);
+	    return __kernel_tanl(y[0],y[1],1-((n&1)<<1)); /*   1 -- n even
+							-1 -- n odd */
+	}
+}
+weak_alias (__tanl, tanl)
diff --git a/sysdeps/ieee754/ldbl-128/s_truncl.c b/sysdeps/ieee754/ldbl-128/s_truncl.c
new file mode 100644
index 0000000000..bbff5a42cf
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_truncl.c
@@ -0,0 +1,57 @@
+/* Truncate argument to nearest integral value not larger than the argument.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
+   		  Jakub Jelinek <jj@ultra.linux.cz>, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+long double
+__truncl (long double x)
+{
+  int32_t j0;
+  u_int64_t i0, i1, sx;
+
+  GET_LDOUBLE_WORDS64 (i0, i1, x);
+  sx = i0 & 0x8000000000000000ULL;
+  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
+  if (j0 < 48)
+    {
+      if (j0 < 0)
+	/* The magnitude of the number is < 1 so the result is +-0.  */
+	SET_LDOUBLE_WORDS64 (x, sx, 0);
+      else
+	SET_LDOUBLE_WORDS64 (x, i0 & ~(0x0000ffffffffffffLL >> j0), 0);
+    }
+  else if (j0 > 111)
+    {
+      if (j0 == 0x4000)
+	/* x is inf or NaN.  */
+	return x + x;
+    }
+  else
+    {
+      SET_LDOUBLE_WORDS64 (x, i0, i1 & ~(0xffffffffffffffffULL >> (j0 - 48)));
+    }
+
+  return x;
+}
+weak_alias (__truncl, truncl)
diff --git a/sysdeps/ieee754/ldbl-128/strtold.c b/sysdeps/ieee754/ldbl-128/strtold.c
new file mode 100644
index 0000000000..32049fc83d
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/strtold.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+/* The actual implementation for all floating point sizes is in strtod.c.
+   These macros tell it to produce the `long double' version, `strtold'.  */
+
+# define FLOAT		long double
+# define FLT		LDBL
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+#  define STRTOF	__strtold_l
+# else
+#  define STRTOF	strtold
+# endif
+# define MPN2FLOAT	__mpn_construct_long_double
+# define FLOAT_HUGE_VAL	HUGE_VALL
+# define SET_MANTISSA(flt, mant) \
+  do { union ieee854_long_double u;					      \
+       u.d = (flt);							      \
+       u.ieee.mantissa0 = 0x8000;					      \
+       u.ieee.mantissa1 = 0;						      \
+       u.ieee.mantissa2 = ((mant) >> 32);	      			      \
+       u.ieee.mantissa3 = (mant) & 0xffffffff;				      \
+       (flt) = u.d;							      \
+  } while (0)
+
+# include "strtod.c"
diff --git a/sysdeps/libm-ieee754/e_acoshl.c b/sysdeps/ieee754/ldbl-96/e_acoshl.c
index a60704aa29..a60704aa29 100644
--- a/sysdeps/libm-ieee754/e_acoshl.c
+++ b/sysdeps/ieee754/ldbl-96/e_acoshl.c
diff --git a/sysdeps/libm-ieee754/e_atan2l.c b/sysdeps/ieee754/ldbl-96/e_atan2l.c
index aff7a3d976..aff7a3d976 100644
--- a/sysdeps/libm-ieee754/e_atan2l.c
+++ b/sysdeps/ieee754/ldbl-96/e_atan2l.c
diff --git a/sysdeps/libm-ieee754/e_atanhl.c b/sysdeps/ieee754/ldbl-96/e_atanhl.c
index fdcd1e9fe8..fdcd1e9fe8 100644
--- a/sysdeps/libm-ieee754/e_atanhl.c
+++ b/sysdeps/ieee754/ldbl-96/e_atanhl.c
diff --git a/sysdeps/libm-ieee754/e_coshl.c b/sysdeps/ieee754/ldbl-96/e_coshl.c
index 6af846cb2d..6af846cb2d 100644
--- a/sysdeps/libm-ieee754/e_coshl.c
+++ b/sysdeps/ieee754/ldbl-96/e_coshl.c
diff --git a/sysdeps/libm-ieee754/e_gammal_r.c b/sysdeps/ieee754/ldbl-96/e_gammal_r.c
index 104992450b..104992450b 100644
--- a/sysdeps/libm-ieee754/e_gammal_r.c
+++ b/sysdeps/ieee754/ldbl-96/e_gammal_r.c
diff --git a/sysdeps/libm-ieee754/e_hypotl.c b/sysdeps/ieee754/ldbl-96/e_hypotl.c
index 1a40c556dc..1a40c556dc 100644
--- a/sysdeps/libm-ieee754/e_hypotl.c
+++ b/sysdeps/ieee754/ldbl-96/e_hypotl.c
diff --git a/sysdeps/libm-ieee754/e_remainderl.c b/sysdeps/ieee754/ldbl-96/e_remainderl.c
index e721a6e8cd..e721a6e8cd 100644
--- a/sysdeps/libm-ieee754/e_remainderl.c
+++ b/sysdeps/ieee754/ldbl-96/e_remainderl.c
diff --git a/sysdeps/libm-ieee754/e_sinhl.c b/sysdeps/ieee754/ldbl-96/e_sinhl.c
index 4f9cfe2c38..4f9cfe2c38 100644
--- a/sysdeps/libm-ieee754/e_sinhl.c
+++ b/sysdeps/ieee754/ldbl-96/e_sinhl.c
diff --git a/sysdeps/ieee754/ldbl2mpn.c b/sysdeps/ieee754/ldbl-96/ldbl2mpn.c
index e95895c0af..78e0b7097f 100644
--- a/sysdeps/ieee754/ldbl2mpn.c
+++ b/sysdeps/ieee754/ldbl-96/ldbl2mpn.c
@@ -24,8 +24,6 @@
 #include <math.h>
 #include <stdlib.h>
 
-#ifndef __NO_LONG_DOUBLE_MATH
-
 /* Convert a `long double' in IEEE854 standard double-precision format to a
    multi-precision integer representing the significand scaled up by its
    number of bits (64 for long double) and an integral power of two
@@ -95,5 +93,3 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
 
   return N;
 }
-
-#endif	/* __NO_LONG_DOUBLE_MATH */
diff --git a/sysdeps/ieee754/ldbl-96/math_ldbl.h b/sysdeps/ieee754/ldbl-96/math_ldbl.h
new file mode 100644
index 0000000000..dccc4a1240
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-96/math_ldbl.h
@@ -0,0 +1,98 @@
+#ifndef _MATH_PRIVATE_H_
+#error "Never use <math_ldbl.h> directly; include <math_private.h> instead."
+#endif
+
+/* A union which permits us to convert between a long double and
+   three 32 bit ints.  */
+
+#if __FLOAT_WORD_ORDER == BIG_ENDIAN
+
+typedef union
+{
+  long double value;
+  struct
+  {
+    unsigned int sign_exponent:16;
+    unsigned int empty:16;
+    u_int32_t msw;
+    u_int32_t lsw;
+  } parts;
+} ieee_long_double_shape_type;
+
+#endif
+
+#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
+
+typedef union
+{
+  long double value;
+  struct
+  {
+    u_int32_t lsw;
+    u_int32_t msw;
+    unsigned int sign_exponent:16;
+    unsigned int empty:16;
+  } parts;
+} ieee_long_double_shape_type;
+
+#endif
+
+/* Get three 32 bit ints from a double.  */
+
+#define GET_LDOUBLE_WORDS(exp,ix0,ix1,d)			\
+do {								\
+  ieee_long_double_shape_type ew_u;				\
+  ew_u.value = (d);						\
+  (exp) = ew_u.parts.sign_exponent;				\
+  (ix0) = ew_u.parts.msw;					\
+  (ix1) = ew_u.parts.lsw;					\
+} while (0)
+
+/* Set a double from two 32 bit ints.  */
+
+#define SET_LDOUBLE_WORDS(d,exp,ix0,ix1)			\
+do {								\
+  ieee_long_double_shape_type iw_u;				\
+  iw_u.parts.sign_exponent = (exp);				\
+  iw_u.parts.msw = (ix0);					\
+  iw_u.parts.lsw = (ix1);					\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Get the more significant 32 bits of a long double mantissa.  */
+
+#define GET_LDOUBLE_MSW(v,d)					\
+do {								\
+  ieee_long_double_shape_type sh_u;				\
+  sh_u.value = (d);						\
+  (v) = sh_u.parts.msw;						\
+} while (0)
+
+/* Set the more significant 32 bits of a long double mantissa from an int.  */
+
+#define SET_LDOUBLE_MSW(d,v)					\
+do {								\
+  ieee_long_double_shape_type sh_u;				\
+  sh_u.value = (d);						\
+  sh_u.parts.msw = (v);						\
+  (d) = sh_u.value;						\
+} while (0)
+
+/* Get int from the exponent of a long double.  */
+
+#define GET_LDOUBLE_EXP(exp,d)					\
+do {								\
+  ieee_long_double_shape_type ge_u;				\
+  ge_u.value = (d);						\
+  (exp) = ge_u.parts.sign_exponent;				\
+} while (0)
+
+/* Set exponent of a long double from an int.  */
+
+#define SET_LDOUBLE_EXP(d,exp)					\
+do {								\
+  ieee_long_double_shape_type se_u;				\
+  se_u.value = (d);						\
+  se_u.parts.sign_exponent = (exp);				\
+  (d) = se_u.value;						\
+} while (0)
diff --git a/sysdeps/ieee754/mpn2ldbl.c b/sysdeps/ieee754/ldbl-96/mpn2ldbl.c
index 7802355eba..1f049ba12e 100644
--- a/sysdeps/ieee754/mpn2ldbl.c
+++ b/sysdeps/ieee754/ldbl-96/mpn2ldbl.c
@@ -22,8 +22,6 @@
 #include <float.h>
 #include <math.h>
 
-#ifndef __NO_LONG_DOUBLE_MATH
-
 /* Convert a multi-precision integer of the needed number of bits (64 for
    long double) and an integral power of two to a `long double' in IEEE854
    extended-precision format.  */
@@ -47,5 +45,3 @@ __mpn_construct_long_double (mp_srcptr frac_ptr, int expt, int sign)
 
   return u.d;
 }
-
-#endif /* __NO_LONG_DOUBLE_MATH */
diff --git a/sysdeps/ieee754/ldbl-96/printf_fphex.c b/sysdeps/ieee754/ldbl-96/printf_fphex.c
new file mode 100644
index 0000000000..8dfa387df5
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-96/printf_fphex.c
@@ -0,0 +1,61 @@
+#ifndef LONG_DOUBLE_DENORM_BIAS
+# define LONG_DOUBLE_DENORM_BIAS (IEEE854_LONG_DOUBLE_BIAS - 1)
+#endif
+
+#define PRINT_FPHEX_LONG_DOUBLE							\
+do {										\
+      /* The "strange" 80 bit format on ix86 and m68k has an explicit		\
+	 leading digit in the 64 bit mantissa.  */				\
+      unsigned long long int num;						\
+										\
+      assert (sizeof (long double) == 12);					\
+										\
+      num = (((unsigned long long int) fpnum.ldbl.ieee.mantissa0) << 32		\
+	     | fpnum.ldbl.ieee.mantissa1);					\
+										\
+      zero_mantissa = num == 0;							\
+										\
+      if (sizeof (unsigned long int) > 6)					\
+	numstr = _itoa_word (num, numbuf + sizeof numbuf, 16,			\
+			     info->spec == 'A');				\
+      else									\
+	numstr = _itoa (num, numbuf + sizeof numbuf, 16, info->spec == 'A');	\
+										\
+      /* Fill with zeroes.  */							\
+      while (numstr > numbuf + (sizeof numbuf - 64 / 4))			\
+	*--numstr = '0';							\
+										\
+      /* We use a full nibble for the leading digit.  */			\
+      leading = *numstr++;							\
+										\
+      /* We have 3 bits from the mantissa in the leading nibble.		\
+	 Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'.  */	\
+      exponent = fpnum.ldbl.ieee.exponent;					\
+										\
+      if (exponent == 0)							\
+	{									\
+	  if (zero_mantissa)							\
+	    expnegative = 0;							\
+	  else									\
+	    {									\
+	      /* This is a denormalized number.  */				\
+	      expnegative = 1;							\
+	      /* This is a hook for the m68k long double format, where the	\
+		 exponent bias is the same for normalized and denormalized	\
+		 numbers.  */							\
+	      exponent = LONG_DOUBLE_DENORM_BIAS + 3;				\
+	    }									\
+	}									\
+      else if (exponent >= IEEE854_LONG_DOUBLE_BIAS + 3)			\
+	{									\
+	  expnegative = 0;							\
+	  exponent -= IEEE854_LONG_DOUBLE_BIAS + 3;				\
+	}									\
+      else									\
+	{									\
+	  expnegative = 1;							\
+	  exponent = -(exponent - (IEEE854_LONG_DOUBLE_BIAS + 3));		\
+	}									\
+} while (0)
+
+#include <sysdeps/generic/printf_fphex.c>
diff --git a/sysdeps/libm-ieee754/s_asinhl.c b/sysdeps/ieee754/ldbl-96/s_asinhl.c
index 6eb434c44b..6eb434c44b 100644
--- a/sysdeps/libm-ieee754/s_asinhl.c
+++ b/sysdeps/ieee754/ldbl-96/s_asinhl.c
diff --git a/sysdeps/libm-ieee754/s_cbrtl.c b/sysdeps/ieee754/ldbl-96/s_cbrtl.c
index 1d021b7c3c..1d021b7c3c 100644
--- a/sysdeps/libm-ieee754/s_cbrtl.c
+++ b/sysdeps/ieee754/ldbl-96/s_cbrtl.c
diff --git a/sysdeps/libm-ieee754/s_ceill.c b/sysdeps/ieee754/ldbl-96/s_ceill.c
index d53f3954ba..d53f3954ba 100644
--- a/sysdeps/libm-ieee754/s_ceill.c
+++ b/sysdeps/ieee754/ldbl-96/s_ceill.c
diff --git a/sysdeps/libm-ieee754/s_copysignl.c b/sysdeps/ieee754/ldbl-96/s_copysignl.c
index 9976575b3b..9976575b3b 100644
--- a/sysdeps/libm-ieee754/s_copysignl.c
+++ b/sysdeps/ieee754/ldbl-96/s_copysignl.c
diff --git a/sysdeps/libm-ieee754/s_cosl.c b/sysdeps/ieee754/ldbl-96/s_cosl.c
index 9765f7fd4e..9765f7fd4e 100644
--- a/sysdeps/libm-ieee754/s_cosl.c
+++ b/sysdeps/ieee754/ldbl-96/s_cosl.c
diff --git a/sysdeps/libm-ieee754/s_fabsl.c b/sysdeps/ieee754/ldbl-96/s_fabsl.c
index f7170503fb..f7170503fb 100644
--- a/sysdeps/libm-ieee754/s_fabsl.c
+++ b/sysdeps/ieee754/ldbl-96/s_fabsl.c
diff --git a/sysdeps/libm-ieee754/s_finitel.c b/sysdeps/ieee754/ldbl-96/s_finitel.c
index 6e444e90d0..6e444e90d0 100644
--- a/sysdeps/libm-ieee754/s_finitel.c
+++ b/sysdeps/ieee754/ldbl-96/s_finitel.c
diff --git a/sysdeps/libm-ieee754/s_floorl.c b/sysdeps/ieee754/ldbl-96/s_floorl.c
index fb0c37e801..fb0c37e801 100644
--- a/sysdeps/libm-ieee754/s_floorl.c
+++ b/sysdeps/ieee754/ldbl-96/s_floorl.c
diff --git a/sysdeps/libm-ieee754/s_fpclassifyl.c b/sysdeps/ieee754/ldbl-96/s_fpclassifyl.c
index 4df0b44f75..4df0b44f75 100644
--- a/sysdeps/libm-ieee754/s_fpclassifyl.c
+++ b/sysdeps/ieee754/ldbl-96/s_fpclassifyl.c
diff --git a/sysdeps/libm-ieee754/s_frexpl.c b/sysdeps/ieee754/ldbl-96/s_frexpl.c
index 7a49bc37c8..7a49bc37c8 100644
--- a/sysdeps/libm-ieee754/s_frexpl.c
+++ b/sysdeps/ieee754/ldbl-96/s_frexpl.c
diff --git a/sysdeps/libm-ieee754/s_ilogbl.c b/sysdeps/ieee754/ldbl-96/s_ilogbl.c
index d44229dcda..d44229dcda 100644
--- a/sysdeps/libm-ieee754/s_ilogbl.c
+++ b/sysdeps/ieee754/ldbl-96/s_ilogbl.c
diff --git a/sysdeps/libm-ieee754/s_isinfl.c b/sysdeps/ieee754/ldbl-96/s_isinfl.c
index 6f7c07c5af..6f7c07c5af 100644
--- a/sysdeps/libm-ieee754/s_isinfl.c
+++ b/sysdeps/ieee754/ldbl-96/s_isinfl.c
diff --git a/sysdeps/libm-ieee754/s_isnanl.c b/sysdeps/ieee754/ldbl-96/s_isnanl.c
index ba53faa1fd..0a7ff38433 100644
--- a/sysdeps/libm-ieee754/s_isnanl.c
+++ b/sysdeps/ieee754/ldbl-96/s_isnanl.c
@@ -39,6 +39,6 @@ static char rcsid[] = "$NetBSD: $";
 	lx |= hx & 0x7fffffff;
 	se |= (u_int32_t)(lx|(-lx))>>31;
 	se = 0xfffe - se;
-	return (int)((u_int32_t)(se))>>16;
+	return (int)(((u_int32_t)(se))>>31);
 }
 weak_alias (__isnanl, isnanl)
diff --git a/sysdeps/libm-ieee754/s_llrintl.c b/sysdeps/ieee754/ldbl-96/s_llrintl.c
index 2aeaa1e102..2aeaa1e102 100644
--- a/sysdeps/libm-ieee754/s_llrintl.c
+++ b/sysdeps/ieee754/ldbl-96/s_llrintl.c
diff --git a/sysdeps/libm-ieee754/s_llroundl.c b/sysdeps/ieee754/ldbl-96/s_llroundl.c
index 4a537c871e..4a537c871e 100644
--- a/sysdeps/libm-ieee754/s_llroundl.c
+++ b/sysdeps/ieee754/ldbl-96/s_llroundl.c
diff --git a/sysdeps/libm-ieee754/s_logbl.c b/sysdeps/ieee754/ldbl-96/s_logbl.c
index 2cd9d105f8..2cd9d105f8 100644
--- a/sysdeps/libm-ieee754/s_logbl.c
+++ b/sysdeps/ieee754/ldbl-96/s_logbl.c
diff --git a/sysdeps/libm-ieee754/s_lrintl.c b/sysdeps/ieee754/ldbl-96/s_lrintl.c
index 673cf3d9db..673cf3d9db 100644
--- a/sysdeps/libm-ieee754/s_lrintl.c
+++ b/sysdeps/ieee754/ldbl-96/s_lrintl.c
diff --git a/sysdeps/libm-ieee754/s_lroundl.c b/sysdeps/ieee754/ldbl-96/s_lroundl.c
index 3bdac830b4..3bdac830b4 100644
--- a/sysdeps/libm-ieee754/s_lroundl.c
+++ b/sysdeps/ieee754/ldbl-96/s_lroundl.c
diff --git a/sysdeps/libm-ieee754/s_modfl.c b/sysdeps/ieee754/ldbl-96/s_modfl.c
index ad16ef65ec..fb1b3acf30 100644
--- a/sysdeps/libm-ieee754/s_modfl.c
+++ b/sysdeps/ieee754/ldbl-96/s_modfl.c
@@ -74,7 +74,7 @@ static long double one = 1.0;
 	    i = ((u_int32_t)(0xffffffff))>>(j0-32);
 	    if((i1&i)==0) { 		/* x is integral */
 		*iptr = x;
-		INSERT_WORDS(x,se&0x8000,0);	/* return +-0 */
+		SET_LDOUBLE_WORDS(x,se&0x8000,0,0);	/* return +-0 */
 		return x;
 	    } else {
 		SET_LDOUBLE_WORDS(*iptr,se,i0,i1&(~i));
diff --git a/sysdeps/libm-ieee754/s_nearbyintl.c b/sysdeps/ieee754/ldbl-96/s_nearbyintl.c
index 3b0715e5a5..92c3ebf368 100644
--- a/sysdeps/libm-ieee754/s_nearbyintl.c
+++ b/sysdeps/ieee754/ldbl-96/s_nearbyintl.c
@@ -72,13 +72,8 @@ TWO63[2]={
 		if(((i0&i)|i1)==0) return x; /* x is integral */
 		i>>=1;
 		if(((i0&i)|i1)!=0) {
-		    if(j0==31) i1 = 0x40000000; else
+		    if (j0==30) i1 = 0x40000000; else
 		    i0 = (i0&(~i))|((0x20000000)>>j0);
-		    /* Shouldn't this be
-		         if (j0 >= 30) i1 = 0x80000000 >> (j0 - 30);
-		         i0 = (i0&(~i))|((0x20000000)>>j0);
-		       If yes, this should be correct in s_rint and
-		       s_rintf, too.  -- drepper@cygnus.com */
 		}
 	    }
 	} else if (j0>62) {
diff --git a/sysdeps/libm-ieee754/s_nextafterl.c b/sysdeps/ieee754/ldbl-96/s_nextafterl.c
index aea57e3086..aea57e3086 100644
--- a/sysdeps/libm-ieee754/s_nextafterl.c
+++ b/sysdeps/ieee754/ldbl-96/s_nextafterl.c
diff --git a/sysdeps/libm-ieee754/s_nexttoward.c b/sysdeps/ieee754/ldbl-96/s_nexttoward.c
index 0bb57d8465..debbb86a3c 100644
--- a/sysdeps/libm-ieee754/s_nexttoward.c
+++ b/sysdeps/ieee754/ldbl-96/s_nexttoward.c
@@ -55,8 +55,8 @@ static char rcsid[] = "$NetBSD: $";
 	    if(x2==x) return x2; else return x;	/* raise underflow flag */
 	}
 	if(hx>=0) {				/* x > 0 */
-	    if (esy>=0x8000||((ix>>20)&0x7ff)>iy
-		|| (((ix>>20)&0x7ff)==iy
+	    if (esy>=0x8000||((ix>>20)&0x7ff)>iy-0x3c00
+		|| (((ix>>20)&0x7ff)==iy-0x3c00
 		    && (((hx<<11)|(lx>>21))>(hy&0x7fffffff)
 			|| (((hx<<11)|(lx>>21))==(hy&0x7fffffff)
 			    && (lx<<11)>ly)))) {	/* x > y, x -= ulp */
@@ -67,8 +67,8 @@ static char rcsid[] = "$NetBSD: $";
 		if(lx==0) hx += 1;
 	    }
 	} else {				/* x < 0 */
-	    if (esy<0x8000||((ix>>20)&0x7ff)>iy
-		|| (((ix>>20)&0x7ff)==iy
+	    if (esy<0x8000||((ix>>20)&0x7ff)>iy-0x3c00
+		|| (((ix>>20)&0x7ff)==iy-0x3c00
 		    && (((hx<<11)|(lx>>21))>(hy&0x7fffffff)
 			|| (((hx<<11)|(lx>>21))==(hy&0x7fffffff)
 			    && (lx<<11)>ly))))	{/* x < y, x -= ulp */
diff --git a/sysdeps/libm-ieee754/s_nexttowardf.c b/sysdeps/ieee754/ldbl-96/s_nexttowardf.c
index 71a28987ec..b7e9f00185 100644
--- a/sysdeps/libm-ieee754/s_nexttowardf.c
+++ b/sysdeps/ieee754/ldbl-96/s_nexttowardf.c
@@ -47,16 +47,16 @@ static char rcsid[] = "$NetBSD: $";
 	    if(x2==x) return x2; else return x;	/* raise underflow flag */
 	}
 	if(hx>=0) {				/* x > 0 */
-	    if(esy>=0x8000||((ix>>23)&0xff)>iy
-	       || (((ix>>23)&0xff)==iy
+	    if(esy>=0x8000||((ix>>23)&0xff)>iy-0x3f80
+	       || (((ix>>23)&0xff)==iy-0x3f80
 		   && ((ix&0x7fffff)<<8)>(hy&0x7fffffff))) {/* x > y, x -= ulp */
 		hx -= 1;
 	    } else {				/* x < y, x += ulp */
 		hx += 1;
 	    }
 	} else {				/* x < 0 */
-	    if(esy<0x8000||((ix>>23)&0xff)>iy
-	       || (((ix>>23)&0xff)==iy
+	    if(esy<0x8000||((ix>>23)&0xff)>iy-0x3f80
+	       || (((ix>>23)&0xff)==iy-0x3f80
 		   && ((ix&0x7fffff)<<8)>(hy&0x7fffffff))) {/* x < y, x -= ulp */
 		hx -= 1;
 	    } else {				/* x > y, x += ulp */
diff --git a/sysdeps/libm-ieee754/s_remquol.c b/sysdeps/ieee754/ldbl-96/s_remquol.c
index 88ff298eb6..88ff298eb6 100644
--- a/sysdeps/libm-ieee754/s_remquol.c
+++ b/sysdeps/ieee754/ldbl-96/s_remquol.c
diff --git a/sysdeps/libm-ieee754/s_rintl.c b/sysdeps/ieee754/ldbl-96/s_rintl.c
index 4e957d8373..9d4777dcc4 100644
--- a/sysdeps/libm-ieee754/s_rintl.c
+++ b/sysdeps/ieee754/ldbl-96/s_rintl.c
@@ -71,13 +71,8 @@ TWO63[2]={
 		if(((i0&i)|i1)==0) return x; /* x is integral */
 		i>>=1;
 		if(((i0&i)|i1)!=0) {
-		    if(j0==31) i1 = 0x40000000; else
+		    if(j0==30) i1 = 0x40000000; else
 		    i0 = (i0&(~i))|((0x20000000)>>j0);
-		    /* Shouldn't this be
-		         if (j0 >= 30) i1 = 0x80000000 >> (j0 - 30);
-		         i0 = (i0&(~i))|((0x20000000)>>j0);
-		       If yes, this should be correct in s_rint and
-		       s_rintf, too.  -- drepper@cygnus.com */
 		}
 	    }
 	} else if (j0>62) {
diff --git a/sysdeps/libm-ieee754/s_roundl.c b/sysdeps/ieee754/ldbl-96/s_roundl.c
index d7482b9b7c..d7482b9b7c 100644
--- a/sysdeps/libm-ieee754/s_roundl.c
+++ b/sysdeps/ieee754/ldbl-96/s_roundl.c
diff --git a/sysdeps/libm-ieee754/s_scalblnl.c b/sysdeps/ieee754/ldbl-96/s_scalblnl.c
index b885fbcadb..8e556fabe1 100644
--- a/sysdeps/libm-ieee754/s_scalblnl.c
+++ b/sysdeps/ieee754/ldbl-96/s_scalblnl.c
@@ -64,7 +64,7 @@ tiny   = 1.0e-4900L;
 	    {SET_LDOUBLE_EXP(x,(es&0x8000)|k); return x;}
         if (k <= -63)
 	    return tiny*__copysignl(tiny,x); 	/*underflow*/
-        k += 54;				/* subnormal result */
+        k += 63;				/* subnormal result */
 	SET_LDOUBLE_EXP(x,(es&0x8000)|k);
         return x*twom63;
 }
diff --git a/sysdeps/libm-ieee754/s_scalbnl.c b/sysdeps/ieee754/ldbl-96/s_scalbnl.c
index 32e4fb8cea..34c52e773a 100644
--- a/sysdeps/libm-ieee754/s_scalbnl.c
+++ b/sysdeps/ieee754/ldbl-96/s_scalbnl.c
@@ -64,7 +64,7 @@ tiny   = 1.0e-4900L;
 	    {SET_LDOUBLE_EXP(x,(es&0x8000)|k); return x;}
         if (k <= -63)
 	    return tiny*__copysignl(tiny,x); 	/*underflow*/
-        k += 54;				/* subnormal result */
+        k += 63;				/* subnormal result */
 	SET_LDOUBLE_EXP(x,(es&0x8000)|k);
         return x*twom63;
 }
diff --git a/sysdeps/libm-ieee754/s_signbitl.c b/sysdeps/ieee754/ldbl-96/s_signbitl.c
index b12fdefff4..b12fdefff4 100644
--- a/sysdeps/libm-ieee754/s_signbitl.c
+++ b/sysdeps/ieee754/ldbl-96/s_signbitl.c
diff --git a/sysdeps/libm-ieee754/s_sincosl.c b/sysdeps/ieee754/ldbl-96/s_sincosl.c
index 78c78d5619..78c78d5619 100644
--- a/sysdeps/libm-ieee754/s_sincosl.c
+++ b/sysdeps/ieee754/ldbl-96/s_sincosl.c
diff --git a/sysdeps/libm-ieee754/s_sinl.c b/sysdeps/ieee754/ldbl-96/s_sinl.c
index 4fd48805b4..4fd48805b4 100644
--- a/sysdeps/libm-ieee754/s_sinl.c
+++ b/sysdeps/ieee754/ldbl-96/s_sinl.c
diff --git a/sysdeps/libm-ieee754/s_tanhl.c b/sysdeps/ieee754/ldbl-96/s_tanhl.c
index 1e3dc3b613..1e3dc3b613 100644
--- a/sysdeps/libm-ieee754/s_tanhl.c
+++ b/sysdeps/ieee754/ldbl-96/s_tanhl.c
diff --git a/sysdeps/libm-ieee754/s_tanl.c b/sysdeps/ieee754/ldbl-96/s_tanl.c
index 97a0b27f32..97a0b27f32 100644
--- a/sysdeps/libm-ieee754/s_tanl.c
+++ b/sysdeps/ieee754/ldbl-96/s_tanl.c
diff --git a/sysdeps/libm-ieee754/s_truncl.c b/sysdeps/ieee754/ldbl-96/s_truncl.c
index 59c3b9c173..59c3b9c173 100644
--- a/sysdeps/libm-ieee754/s_truncl.c
+++ b/sysdeps/ieee754/ldbl-96/s_truncl.c
diff --git a/sysdeps/ieee754/ldbl-96/strtold.c b/sysdeps/ieee754/ldbl-96/strtold.c
new file mode 100644
index 0000000000..cabb787d4e
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-96/strtold.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <math.h>
+
+/* The actual implementation for all floating point sizes is in strtod.c.
+   These macros tell it to produce the `long double' version, `strtold'.  */
+
+# define FLOAT		long double
+# define FLT		LDBL
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+#  define STRTOF	__strtold_l
+# else
+#  define STRTOF	strtold
+# endif
+# define MPN2FLOAT	__mpn_construct_long_double
+# define FLOAT_HUGE_VAL	HUGE_VALL
+# define SET_MANTISSA(flt, mant) \
+  do { union ieee854_long_double u;					      \
+       u.d = (flt);							      \
+       if ((mant & 0x7fffffffffffffffULL) == 0)				      \
+	 mant = 0x4000000000000000ULL;					      \
+       u.ieee.mantissa0 = (((mant) >> 32) & 0x7fffffff) | 0x80000000;	      \
+       u.ieee.mantissa1 = (mant) & 0xffffffff;				      \
+       (flt) = u.d;							      \
+  } while (0)
+
+# include "strtod.c"
diff --git a/sysdeps/libm-ieee754/w_expl.c b/sysdeps/ieee754/ldbl-96/w_expl.c
index b8152cea65..b8152cea65 100644
--- a/sysdeps/libm-ieee754/w_expl.c
+++ b/sysdeps/ieee754/ldbl-96/w_expl.c
diff --git a/sysdeps/libm-ieee754/s_lib_version.c b/sysdeps/ieee754/s_lib_version.c
index 121bdaa540..121bdaa540 100644
--- a/sysdeps/libm-ieee754/s_lib_version.c
+++ b/sysdeps/ieee754/s_lib_version.c
diff --git a/sysdeps/libm-ieee754/s_matherr.c b/sysdeps/ieee754/s_matherr.c
index 1ad3eb3334..1ad3eb3334 100644
--- a/sysdeps/libm-ieee754/s_matherr.c
+++ b/sysdeps/ieee754/s_matherr.c
diff --git a/sysdeps/libm-ieee754/s_signgam.c b/sysdeps/ieee754/s_signgam.c
index 021b0ffca1..021b0ffca1 100644
--- a/sysdeps/libm-ieee754/s_signgam.c
+++ b/sysdeps/ieee754/s_signgam.c
diff --git a/sysdeps/libm-ieee754/w_acos.c b/sysdeps/libm-ieee754/w_acos.c
deleted file mode 100644
index 5a1158ea7a..0000000000
--- a/sysdeps/libm-ieee754/w_acos.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* @(#)w_acos.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_acos.c,v 1.6 1995/05/10 20:48:26 jtc Exp $";
-#endif
-
-/*
- * wrap_acos(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __acos(double x)		/* wrapper acos */
-#else
-	double __acos(x)			/* wrapper acos */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_acos(x);
-#else
-	double z;
-	z = __ieee754_acos(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
-	if(fabs(x)>1.0) {
-	        return __kernel_standard(x,x,1); /* acos(|x|>1) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__acos, acos)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__acos, __acosl)
-weak_alias (__acos, acosl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_acosf.c b/sysdeps/libm-ieee754/w_acosf.c
deleted file mode 100644
index 28260ddd3e..0000000000
--- a/sysdeps/libm-ieee754/w_acosf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_acosf.c -- float version of w_acos.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_acosf.c,v 1.3 1995/05/10 20:48:29 jtc Exp $";
-#endif
-
-/*
- * wrap_acosf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __acosf(float x)		/* wrapper acosf */
-#else
-	float __acosf(x)			/* wrapper acosf */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_acosf(x);
-#else
-	float z;
-	z = __ieee754_acosf(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
-	if(fabsf(x)>(float)1.0) {
-	        /* acosf(|x|>1) */
-	        return (float)__kernel_standard((double)x,(double)x,101);
-	} else
-	    return z;
-#endif
-}
-weak_alias (__acosf, acosf)
diff --git a/sysdeps/libm-ieee754/w_acosh.c b/sysdeps/libm-ieee754/w_acosh.c
deleted file mode 100644
index 2b5d60f7ea..0000000000
--- a/sysdeps/libm-ieee754/w_acosh.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* @(#)w_acosh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_acosh.c,v 1.6 1995/05/10 20:48:31 jtc Exp $";
-#endif
-
-/*
- * wrapper acosh(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double __acosh(double x)		/* wrapper acosh */
-#else
-	double __acosh(x)			/* wrapper acosh */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_acosh(x);
-#else
-	double z;
-	z = __ieee754_acosh(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
-	if(x<1.0) {
-	        return __kernel_standard(x,x,29); /* acosh(x<1) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__acosh, acosh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__acosh, __acoshl)
-weak_alias (__acosh, acoshl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_acoshf.c b/sysdeps/libm-ieee754/w_acoshf.c
deleted file mode 100644
index f701983dc2..0000000000
--- a/sysdeps/libm-ieee754/w_acoshf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_acoshf.c -- float version of w_acosh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- *
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_acoshf.c,v 1.3 1995/05/10 20:48:33 jtc Exp $";
-#endif
-
-/* 
- * wrapper acoshf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float __acoshf(float x)		/* wrapper acoshf */
-#else
-	float __acoshf(x)			/* wrapper acoshf */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_acoshf(x);
-#else
-	float z;
-	z = __ieee754_acoshf(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
-	if(x<(float)1.0) {
-		/* acosh(x<1) */
-	        return (float)__kernel_standard((double)x,(double)x,129);
-	} else
-	    return z;
-#endif
-}
-weak_alias (__acoshf, acoshf)
diff --git a/sysdeps/libm-ieee754/w_acoshl.c b/sysdeps/libm-ieee754/w_acoshl.c
deleted file mode 100644
index a37d4c15d9..0000000000
--- a/sysdeps/libm-ieee754/w_acoshl.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_acoshl.c -- long double version of w_acosh.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper acoshl(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	long double __acoshl(long double x)	/* wrapper acosh */
-#else
-	long double __acoshl(x)			/* wrapper acosh */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_acoshl(x);
-#else
-	long double z;
-	z = __ieee754_acoshl(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
-	if(x<1.0) {
-	        return __kernel_standard(x,x,229); /* acoshl(x<1) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__acoshl, acoshl)
diff --git a/sysdeps/libm-ieee754/w_asin.c b/sysdeps/libm-ieee754/w_asin.c
deleted file mode 100644
index a7ca4ef9fd..0000000000
--- a/sysdeps/libm-ieee754/w_asin.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* @(#)w_asin.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_asin.c,v 1.6 1995/05/10 20:48:35 jtc Exp $";
-#endif
-
-/*
- * wrapper asin(x)
- */
-
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __asin(double x)		/* wrapper asin */
-#else
-	double __asin(x)			/* wrapper asin */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_asin(x);
-#else
-	double z;
-	z = __ieee754_asin(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
-	if(fabs(x)>1.0) {
-	        return __kernel_standard(x,x,2); /* asin(|x|>1) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__asin, asin)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__asin, __asinl)
-weak_alias (__asin, asinl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_asinf.c b/sysdeps/libm-ieee754/w_asinf.c
deleted file mode 100644
index d7f7a253b0..0000000000
--- a/sysdeps/libm-ieee754/w_asinf.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* w_asinf.c -- float version of w_asin.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_asinf.c,v 1.3 1995/05/10 20:48:37 jtc Exp $";
-#endif
-
-/* 
- * wrapper asinf(x)
- */
-
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __asinf(float x)		/* wrapper asinf */
-#else
-	float __asinf(x)			/* wrapper asinf */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_asinf(x);
-#else
-	float z;
-	z = __ieee754_asinf(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
-	if(fabsf(x)>(float)1.0) {
-	    /* asinf(|x|>1) */
-	    return (float)__kernel_standard((double)x,(double)x,102);
-	} else
-	    return z;
-#endif
-}
-weak_alias (__asinf, asinf)
diff --git a/sysdeps/libm-ieee754/w_asinl.c b/sysdeps/libm-ieee754/w_asinl.c
deleted file mode 100644
index 0ac3038e95..0000000000
--- a/sysdeps/libm-ieee754/w_asinl.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* w_asinl.c -- long double version of w_asin.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper asinl(x)
- */
-
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	long double __asinl(long double x)	/* wrapper asinl */
-#else
-	long double __asinl(x)			/* wrapper asinl */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_asinl(x);
-#else
-	long double z;
-	z = __ieee754_asinl(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
-	if(fabsl(x)>1.0) {
-	        return __kernel_standard(x,x,202); /* asinl(|x|>1) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__asinl, asinl)
diff --git a/sysdeps/libm-ieee754/w_atan2.c b/sysdeps/libm-ieee754/w_atan2.c
deleted file mode 100644
index 801baa2347..0000000000
--- a/sysdeps/libm-ieee754/w_atan2.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* @(#)w_atan2.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_atan2.c,v 1.6 1995/05/10 20:48:39 jtc Exp $";
-#endif
-
-/*
- * wrapper atan2(y,x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __atan2(double y, double x)	/* wrapper atan2 */
-#else
-	double __atan2(y,x)			/* wrapper atan2 */
-	double y,x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_atan2(y,x);
-#else
-	double z;
-	z = __ieee754_atan2(y,x);
-	if(_LIB_VERSION != _SVID_||__isnan(x)||__isnan(y)) return z;
-	if(x==0.0&&y==0.0)
-	  return __kernel_standard(y,x,3); /* atan2(+-0,+-0) */
-	return z;
-#endif
-}
-weak_alias (__atan2, atan2)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__atan2, __atan2l)
-weak_alias (__atan2, atan2l)
-#endif
diff --git a/sysdeps/libm-ieee754/w_atan2f.c b/sysdeps/libm-ieee754/w_atan2f.c
deleted file mode 100644
index 09caa06f00..0000000000
--- a/sysdeps/libm-ieee754/w_atan2f.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* w_atan2f.c -- float version of w_atan2.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_atan2f.c,v 1.3 1995/05/10 20:48:42 jtc Exp $";
-#endif
-
-/*
- * wrapper atan2f(y,x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __atan2f(float y, float x)		/* wrapper atan2f */
-#else
-	float __atan2f(y,x)			/* wrapper atan2 */
-	float y,x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_atan2f(y,x);
-#else
-	float z;
-	z = __ieee754_atan2f(y,x);
-	if(_LIB_VERSION != _SVID_||__isnanf(x)||__isnanf(y)) return z;
-	if(x==0.0&&y==0.0)
-	  return __kernel_standard(y,x,103); /* atan2(+-0,+-0) */
-	return z;
-#endif
-}
-weak_alias (__atan2f, atan2f)
diff --git a/sysdeps/libm-ieee754/w_atan2l.c b/sysdeps/libm-ieee754/w_atan2l.c
deleted file mode 100644
index 2897c8c5f9..0000000000
--- a/sysdeps/libm-ieee754/w_atan2l.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_atan2l.c -- long double version of w_atan2.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper atan2l(y,x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	long double __atan2l(long double y, long double x) /* wrapper atan2l */
-#else
-	long double __atan2l(y,x)			/* wrapper atan2l */
-	long double y,x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_atan2l(y,x);
-#else
-	long double z;
-	z = __ieee754_atan2l(y,x);
-	if(_LIB_VERSION != _SVID_||__isnanl(x)||__isnanl(y)) return z;
-	if(x==0.0&&y==0.0)
-	  return __kernel_standard(y,x,203); /* atan2(+-0,+-0) */
-	return z;
-#endif
-}
-weak_alias (__atan2l, atan2l)
diff --git a/sysdeps/libm-ieee754/w_atanh.c b/sysdeps/libm-ieee754/w_atanh.c
deleted file mode 100644
index e7995b1830..0000000000
--- a/sysdeps/libm-ieee754/w_atanh.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* @(#)w_atanh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_atanh.c,v 1.6 1995/05/10 20:48:43 jtc Exp $";
-#endif
-
-/*
- * wrapper atanh(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __atanh(double x)		/* wrapper atanh */
-#else
-	double __atanh(x)			/* wrapper atanh */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_atanh(x);
-#else
-	double z,y;
-	z = __ieee754_atanh(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
-	y = fabs(x);
-	if(y>=1.0) {
-	    if(y>1.0)
-	        return __kernel_standard(x,x,30); /* atanh(|x|>1) */
-	    else
-	        return __kernel_standard(x,x,31); /* atanh(|x|==1) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__atanh, atanh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__atanh, __atanhl)
-weak_alias (__atanh, atanhl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_atanhf.c b/sysdeps/libm-ieee754/w_atanhf.c
deleted file mode 100644
index 0b24f2c71a..0000000000
--- a/sysdeps/libm-ieee754/w_atanhf.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* w_atanhf.c -- float version of w_atanh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_atanhf.c,v 1.3 1995/05/10 20:48:45 jtc Exp $";
-#endif
-
-/* 
- * wrapper atanhf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __atanhf(float x)		/* wrapper atanhf */
-#else
-	float __atanhf(x)			/* wrapper atanhf */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_atanhf(x);
-#else
-	float z,y;
-	z = __ieee754_atanhf(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
-	y = fabsf(x);
-	if(y>=(float)1.0) {
-	    if(y>(float)1.0)
-	        /* atanhf(|x|>1) */
-	        return (float)__kernel_standard((double)x,(double)x,130);
-	    else 
-	        /* atanhf(|x|==1) */
-	        return (float)__kernel_standard((double)x,(double)x,131);
-	} else
-	    return z;
-#endif
-}
-weak_alias (__atanhf, atanhf)
diff --git a/sysdeps/libm-ieee754/w_atanhl.c b/sysdeps/libm-ieee754/w_atanhl.c
deleted file mode 100644
index d675fc6fe7..0000000000
--- a/sysdeps/libm-ieee754/w_atanhl.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* w_atanhl.c -- long double version of w_atanh.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper atanhl(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	long double __atanhl(long double x)	/* wrapper atanhl */
-#else
-	long double __atanhl(x)			/* wrapper atanhl */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_atanhl(x);
-#else
-	long double z,y;
-	z = __ieee754_atanhl(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
-	y = fabsl(x);
-	if(y>=1.0) {
-	    if(y>1.0)
-	        return __kernel_standard(x,x,230); /* atanhl(|x|>1) */
-	    else
-	        return __kernel_standard(x,x,231); /* atanhl(|x|==1) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__atanhl, atanhl)
diff --git a/sysdeps/libm-ieee754/w_cosh.c b/sysdeps/libm-ieee754/w_cosh.c
deleted file mode 100644
index 8db25c868c..0000000000
--- a/sysdeps/libm-ieee754/w_cosh.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* @(#)w_cosh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_cosh.c,v 1.6 1995/05/10 20:48:47 jtc Exp $";
-#endif
-
-/*
- * wrapper cosh(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double __cosh(double x)		/* wrapper cosh */
-#else
-	double __cosh(x)			/* wrapper cosh */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_cosh(x);
-#else
-	double z;
-	z = __ieee754_cosh(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
-	if(fabs(x)>7.10475860073943863426e+02) {
-	        return __kernel_standard(x,x,5); /* cosh overflow */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__cosh, cosh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cosh, __coshl)
-weak_alias (__cosh, coshl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_coshf.c b/sysdeps/libm-ieee754/w_coshf.c
deleted file mode 100644
index 53ca84108e..0000000000
--- a/sysdeps/libm-ieee754/w_coshf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_coshf.c -- float version of w_cosh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_coshf.c,v 1.3 1995/05/10 20:48:49 jtc Exp $";
-#endif
-
-/* 
- * wrapper coshf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float __coshf(float x)		/* wrapper coshf */
-#else
-	float __coshf(x)			/* wrapper coshf */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_coshf(x);
-#else
-	float z;
-	z = __ieee754_coshf(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
-	if(fabsf(x)>(float)8.9415985107e+01) {	
-		/* cosh overflow */
-	        return (float)__kernel_standard((double)x,(double)x,105);
-	} else
-	    return z;
-#endif
-}
-weak_alias (__coshf, coshf)
diff --git a/sysdeps/libm-ieee754/w_coshl.c b/sysdeps/libm-ieee754/w_coshl.c
deleted file mode 100644
index 343d5724b9..0000000000
--- a/sysdeps/libm-ieee754/w_coshl.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_acoshl.c -- long double version of w_acosh.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper coshl(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	long double __coshl(long double x)	/* wrapper coshl */
-#else
-	long double __coshl(x)			/* wrapper coshl */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_coshl(x);
-#else
-	long double z;
-	z = __ieee754_coshl(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
-	if(fabsl(x)>7.10475860073943863426e+02) {
-	        return __kernel_standard(x,x,205); /* cosh overflow */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__coshl, coshl)
diff --git a/sysdeps/libm-ieee754/w_drem.c b/sysdeps/libm-ieee754/w_drem.c
deleted file mode 100644
index 9e2b1e7472..0000000000
--- a/sysdeps/libm-ieee754/w_drem.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * drem() wrapper for remainder().
- *
- * Written by J.T. Conklin, <jtc@wimsey.com>
- * Placed into the Public Domain, 1994.
- */
-
-#include <math.h>
-
-double
-__drem(x, y)
-	double x, y;
-{
-	return __remainder(x, y);
-}
-weak_alias (__drem, drem)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__drem, __dreml)
-weak_alias (__drem, dreml)
-#endif
diff --git a/sysdeps/libm-ieee754/w_dremf.c b/sysdeps/libm-ieee754/w_dremf.c
deleted file mode 100644
index b740ea304c..0000000000
--- a/sysdeps/libm-ieee754/w_dremf.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * dremf() wrapper for remainderf().
- * 
- * Written by J.T. Conklin, <jtc@wimsey.com>
- * Placed into the Public Domain, 1994.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-float
-__dremf(x, y)
-	float x, y;
-{
-	return __remainderf(x, y);
-}
-weak_alias (__dremf, dremf)
diff --git a/sysdeps/libm-ieee754/w_dreml.c b/sysdeps/libm-ieee754/w_dreml.c
deleted file mode 100644
index aa73eedc49..0000000000
--- a/sysdeps/libm-ieee754/w_dreml.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * dreml() wrapper for remainderl().
- *
- * Written by J.T. Conklin, <jtc@wimsey.com>
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- * Placed into the Public Domain, 1994.
- */
-
-#include <math.h>
-
-long double
-__dreml(x, y)
-	long double x, y;
-{
-	return __remainderl(x, y);
-}
-weak_alias (__dreml, dreml)
diff --git a/sysdeps/libm-ieee754/w_exp10.c b/sysdeps/libm-ieee754/w_exp10.c
deleted file mode 100644
index bf0d361f52..0000000000
--- a/sysdeps/libm-ieee754/w_exp10.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* @(#)w_exp10.c
- * Conversion to exp10 by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * wrapper exp10(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-o_threshold=  3.0825471555991674389672e+02,
-u_threshold= -3.2360724533877978485251e+02;
-
-#ifdef __STDC__
-	double __exp10(double x)		/* wrapper exp10 */
-#else
-	double __exp10(x)			/* wrapper exp10 */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_exp10(x);
-#else
-	double z;
-	z = __ieee754_exp10(x);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if(__finite(x)) {
-	    if(x>o_threshold)
-	        return __kernel_standard(x,x,46); /* exp10 overflow */
-	    else if(x<u_threshold)
-	        return __kernel_standard(x,x,47); /* exp10 underflow */
-	}
-	return z;
-#endif
-}
-weak_alias (__exp10, exp10)
-strong_alias (__exp10, __pow10)
-weak_alias (__pow10, pow10)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__exp10, __exp10l)
-weak_alias (__exp10, exp10l)
-strong_alias (__exp10l, __pow10l)
-weak_alias (__pow10l, pow10l)
-#endif
diff --git a/sysdeps/libm-ieee754/w_exp10f.c b/sysdeps/libm-ieee754/w_exp10f.c
deleted file mode 100644
index f78be7973b..0000000000
--- a/sysdeps/libm-ieee754/w_exp10f.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* w_exp10f.c -- float version of w_exp10.c.
- * Conversion to exp10 by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * wrapper expf10(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-o_threshold=  3.853183944498959298709e+01,
-u_threshold= -4.515449934959717928174e+01;
-
-#ifdef __STDC__
-	float __exp10f(float x)		/* wrapper exp10f */
-#else
-	float __exp10f(x)			/* wrapper exp10f */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_exp10f(x);
-#else
-	float z;
-	z = __ieee754_exp10f(x);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if(__finitef(x)) {
-	    if(x>o_threshold)
-	        /* exp overflow */
-	        return (float)__kernel_standard((double)x,(double)x,146);
-	    else if(x<u_threshold)
-	        /* exp underflow */
-	        return (float)__kernel_standard((double)x,(double)x,147);
-	}
-	return z;
-#endif
-}
-weak_alias (__exp10f, exp10f)
-strong_alias (__exp10f, __pow10f)
-weak_alias (__pow10f, pow10f)
diff --git a/sysdeps/libm-ieee754/w_exp10l.c b/sysdeps/libm-ieee754/w_exp10l.c
deleted file mode 100644
index 7117873c22..0000000000
--- a/sysdeps/libm-ieee754/w_exp10l.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* w_exp10l.c -- long double version of w_exp10.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * wrapper exp10l(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const long double
-#else
-static long double
-#endif
-o_threshold=  4.93207544895866790234755e+03,
-u_threshold= -4.95104033868549871764588e+03;
-
-#ifdef __STDC__
-	long double __exp10l(long double x)	/* wrapper exp10 */
-#else
-	long double __exp10l(x)			/* wrapper exp10 */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_exp10l(x);
-#else
-	long double z;
-	z = __ieee754_exp10l(x);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if(__finitel(x)) {
-	    if(x>o_threshold)
-	        return __kernel_standard(x,x,246); /* exp10 overflow */
-	    else if(x<u_threshold)
-	        return __kernel_standard(x,x,247); /* exp10 underflow */
-	}
-	return z;
-#endif
-}
-weak_alias (__exp10l, exp10l)
-strong_alias (__exp10l, __pow10l)
-weak_alias (__pow10l, pow10l)
diff --git a/sysdeps/libm-ieee754/w_exp2.c b/sysdeps/libm-ieee754/w_exp2.c
deleted file mode 100644
index 126aa090bc..0000000000
--- a/sysdeps/libm-ieee754/w_exp2.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * wrapper exp2(x)
- */
-
-#include <float.h>
-#include "math.h"
-#include "math_private.h"
-
-static const double o_threshold= (double) DBL_MAX_EXP;
-static const double u_threshold= (double) DBL_MIN_EXP;
-
-double
-__exp2 (double x)		/* wrapper exp2 */
-{
-#ifdef _IEEE_LIBM
-  return __ieee754_exp2 (x);
-#else
-  double z;
-  z = __ieee754_exp2 (x);
-  if (_LIB_VERSION != _IEEE_ && __finite (x))
-    {
-      if (x > o_threshold)
-	/* exp2 overflow */
-	return __kernel_standard (x, x, 44);
-      else if (x < u_threshold)
-	/* exp2 underflow */
-	return __kernel_standard (x, x, 45);
-    }
-  return z;
-#endif
-}
-weak_alias (__exp2, exp2)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__exp2, __expl2)
-weak_alias (__exp2, expl2)
-#endif
diff --git a/sysdeps/libm-ieee754/w_exp2f.c b/sysdeps/libm-ieee754/w_exp2f.c
deleted file mode 100644
index d2c340db3f..0000000000
--- a/sysdeps/libm-ieee754/w_exp2f.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * wrapper exp2f(x)
- */
-
-#include <float.h>
-#include "math.h"
-#include "math_private.h"
-
-static const float o_threshold= (float) FLT_MAX_EXP;
-static const float u_threshold= (float) FLT_MIN_EXP;
-
-float
-__exp2f (float x)		/* wrapper exp2f */
-{
-#ifdef _IEEE_LIBM
-  return __ieee754_exp2f (x);
-#else
-  float z;
-  z = __ieee754_exp2f (x);
-  if (_LIB_VERSION != _IEEE_ && __finitef (x))
-    {
-      if (x > o_threshold)
-	/* exp2 overflow */
-	return (float) __kernel_standard ((double) x, (double) x, 144);
-      else if (x < u_threshold)
-	/* exp2 underflow */
-	return (float) __kernel_standard ((double) x, (double) x, 145);
-    }
-  return z;
-#endif
-}
-weak_alias (__exp2f, exp2f)
diff --git a/sysdeps/libm-ieee754/w_exp2l.c b/sysdeps/libm-ieee754/w_exp2l.c
deleted file mode 100644
index 965e9bf3e4..0000000000
--- a/sysdeps/libm-ieee754/w_exp2l.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * wrapper exp2l(x)
- */
-
-#include <float.h>
-#include "math.h"
-#include "math_private.h"
-
-static const long double o_threshold = (long double) LDBL_MAX_EXP;
-static const long double u_threshold = (long double) LDBL_MIN_EXP;
-
-long double
-__exp2l (long double x)			/* wrapper exp2l */
-{
-#ifdef _IEEE_LIBM
-  return __ieee754_exp2l (x);
-#else
-  long double z;
-  z = __ieee754_exp2l (x);
-  if (_LIB_VERSION != _IEEE_ && __finitel (x))
-    {
-      if (x > o_threshold)
-	return __kernel_standard (x, x, 244); /* exp2l overflow */
-      else if (x < u_threshold)
-	return __kernel_standard (x, x, 245); /* exp2l underflow */
-    }
-  return z;
-#endif
-}
-weak_alias (__exp2l, exp2l)
diff --git a/sysdeps/libm-ieee754/w_fmod.c b/sysdeps/libm-ieee754/w_fmod.c
deleted file mode 100644
index 0ceeb98c55..0000000000
--- a/sysdeps/libm-ieee754/w_fmod.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* @(#)w_fmod.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_fmod.c,v 1.6 1995/05/10 20:48:55 jtc Exp $";
-#endif
-
-/*
- * wrapper fmod(x,y)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __fmod(double x, double y)	/* wrapper fmod */
-#else
-	double __fmod(x,y)		/* wrapper fmod */
-	double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_fmod(x,y);
-#else
-	double z;
-	z = __ieee754_fmod(x,y);
-	if(_LIB_VERSION == _IEEE_ ||__isnan(y)||__isnan(x)) return z;
-	if(y==0.0) {
-	        return __kernel_standard(x,y,27); /* fmod(x,0) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__fmod, fmod)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__fmod, __fmodl)
-weak_alias (__fmod, fmodl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_fmodf.c b/sysdeps/libm-ieee754/w_fmodf.c
deleted file mode 100644
index 9afe5ddfdd..0000000000
--- a/sysdeps/libm-ieee754/w_fmodf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_fmodf.c -- float version of w_fmod.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_fmodf.c,v 1.3 1995/05/10 20:48:57 jtc Exp $";
-#endif
-
-/* 
- * wrapper fmodf(x,y)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __fmodf(float x, float y)	/* wrapper fmodf */
-#else
-	float __fmodf(x,y)		/* wrapper fmodf */
-	float x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_fmodf(x,y);
-#else
-	float z;
-	z = __ieee754_fmodf(x,y);
-	if(_LIB_VERSION == _IEEE_ ||__isnanf(y)||__isnanf(x)) return z;
-	if(y==(float)0.0) {
-		/* fmodf(x,0) */
-	        return (float)__kernel_standard((double)x,(double)y,127);
-	} else
-	    return z;
-#endif
-}
-weak_alias (__fmodf, fmodf)
diff --git a/sysdeps/libm-ieee754/w_hypot.c b/sysdeps/libm-ieee754/w_hypot.c
deleted file mode 100644
index e91db17083..0000000000
--- a/sysdeps/libm-ieee754/w_hypot.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* @(#)w_hypot.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_hypot.c,v 1.6 1995/05/10 20:49:07 jtc Exp $";
-#endif
-
-/*
- * wrapper hypot(x,y)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __hypot(double x, double y)/* wrapper hypot */
-#else
-	double __hypot(x,y)		/* wrapper hypot */
-	double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_hypot(x,y);
-#else
-	double z;
-	z = __ieee754_hypot(x,y);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if((!__finite(z))&&__finite(x)&&__finite(y))
-	    return __kernel_standard(x,y,4); /* hypot overflow */
-	else
-	    return z;
-#endif
-}
-weak_alias (__hypot, hypot)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__hypot, __hypotl)
-weak_alias (__hypot, hypotl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_hypotf.c b/sysdeps/libm-ieee754/w_hypotf.c
deleted file mode 100644
index a7e5c1fdb6..0000000000
--- a/sysdeps/libm-ieee754/w_hypotf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_hypotf.c -- float version of w_hypot.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_hypotf.c,v 1.3 1995/05/10 20:49:09 jtc Exp $";
-#endif
-
-/*
- * wrapper hypotf(x,y)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __hypotf(float x, float y)	/* wrapper hypotf */
-#else
-	float __hypotf(x,y)		/* wrapper hypotf */
-	float x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_hypotf(x,y);
-#else
-	float z;
-	z = __ieee754_hypotf(x,y);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if((!__finitef(z))&&__finitef(x)&&__finitef(y))
-	    /* hypot overflow */
-	    return (float)__kernel_standard((double)x,(double)y,104);
-	else
-	    return z;
-#endif
-}
-weak_alias (__hypotf, hypotf)
diff --git a/sysdeps/libm-ieee754/w_hypotl.c b/sysdeps/libm-ieee754/w_hypotl.c
deleted file mode 100644
index 2ec215fd13..0000000000
--- a/sysdeps/libm-ieee754/w_hypotl.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_hypotl.c -- long double version of w_hypot.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper hypotl(x,y)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	long double __hypotl(long double x, long double y)/* wrapper hypotl */
-#else
-	long double __hypotl(x,y)			 /* wrapper hypotl */
-	long double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_hypotl(x,y);
-#else
-	long double z;
-	z = __ieee754_hypotl(x,y);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if((!__finitel(z))&&__finitel(x)&&__finitel(y))
-	    return __kernel_standard(x,y,204); /* hypot overflow */
-	else
-	    return z;
-#endif
-}
-weak_alias (__hypotl, hypotl)
diff --git a/sysdeps/libm-ieee754/w_j0.c b/sysdeps/libm-ieee754/w_j0.c
deleted file mode 100644
index 5a018760bb..0000000000
--- a/sysdeps/libm-ieee754/w_j0.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* @(#)w_j0.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $";
-#endif
-
-/*
- * wrapper j0(double x), y0(double x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double j0(double x)		/* wrapper j0 */
-#else
-	double j0(x)			/* wrapper j0 */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_j0(x);
-#else
-	double z = __ieee754_j0(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
-	if(fabs(x)>X_TLOSS) {
-	        return __kernel_standard(x,x,34); /* j0(|x|>X_TLOSS) */
-	} else
-	    return z;
-#endif
-}
-#ifdef NO_LONG_DOUBLE
-strong_alias (j0, j0l)
-#endif
-
-
-#ifdef __STDC__
-	double y0(double x)		/* wrapper y0 */
-#else
-	double y0(x)			/* wrapper y0 */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_y0(x);
-#else
-	double z;
-	z = __ieee754_y0(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
-        if(x <= 0.0){
-                if(x==0.0)
-                    /* d= -one/(x-x); */
-                    return __kernel_standard(x,x,8);
-                else
-                    /* d = zero/(x-x); */
-                    return __kernel_standard(x,x,9);
-        }
-	if(x>X_TLOSS) {
-	        return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */
-	} else
-	    return z;
-#endif
-}
-#ifdef NO_LONG_DOUBLE
-strong_alias (y0, y0l)
-#endif
diff --git a/sysdeps/libm-ieee754/w_j0f.c b/sysdeps/libm-ieee754/w_j0f.c
deleted file mode 100644
index 32e2eebb56..0000000000
--- a/sysdeps/libm-ieee754/w_j0f.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* w_j0f.c -- float version of w_j0.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_j0f.c,v 1.3 1995/05/10 20:49:13 jtc Exp $";
-#endif
-
-/*
- * wrapper j0f(float x), y0f(float x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float j0f(float x)		/* wrapper j0f */
-#else
-	float j0f(x)			/* wrapper j0f */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_j0f(x);
-#else
-	float z = __ieee754_j0f(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
-	if(fabsf(x)>(float)X_TLOSS) {
-		/* j0f(|x|>X_TLOSS) */
-	        return (float)__kernel_standard((double)x,(double)x,134);
-	} else
-	    return z;
-#endif
-}
-
-#ifdef __STDC__
-	float y0f(float x)		/* wrapper y0f */
-#else
-	float y0f(x)			/* wrapper y0f */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_y0f(x);
-#else
-	float z;
-	z = __ieee754_y0f(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
-        if(x <= (float)0.0){
-                if(x==(float)0.0)
-                    /* d= -one/(x-x); */
-                    return (float)__kernel_standard((double)x,(double)x,108);
-                else
-                    /* d = zero/(x-x); */
-                    return (float)__kernel_standard((double)x,(double)x,109);
-        }
-	if(x>(float)X_TLOSS) {
-		/* y0(x>X_TLOSS) */
-	        return (float)__kernel_standard((double)x,(double)x,135);
-	} else
-	    return z;
-#endif
-}
diff --git a/sysdeps/libm-ieee754/w_j0l.c b/sysdeps/libm-ieee754/w_j0l.c
deleted file mode 100644
index b74d9ddcff..0000000000
--- a/sysdeps/libm-ieee754/w_j0l.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* w_j0l.c -- long double version of w_j0.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper j0l(long double x), y0l(long double x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	long double j0l(long double x)		/* wrapper j0l */
-#else
-	long double j0l(x)				/* wrapper j0 */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_j0l(x);
-#else
-	long double z = __ieee754_j0l(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
-	if(fabsl(x)>X_TLOSS) {
-	        return __kernel_standard(x,x,234); /* j0(|x|>X_TLOSS) */
-	} else
-	    return z;
-#endif
-}
-
-#ifdef __STDC__
-	long double y0l(long double x)		/* wrapper y0l */
-#else
-	long double y0l(x)				/* wrapper y0 */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_y0l(x);
-#else
-	long double z;
-	z = __ieee754_y0l(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
-        if(x <= 0.0){
-                if(x==0.0)
-                    /* d= -one/(x-x); */
-                    return __kernel_standard(x,x,208);
-                else
-                    /* d = zero/(x-x); */
-                    return __kernel_standard(x,x,209);
-        }
-	if(x>X_TLOSS) {
-	        return __kernel_standard(x,x,235); /* y0(x>X_TLOSS) */
-	} else
-	    return z;
-#endif
-}
diff --git a/sysdeps/libm-ieee754/w_j1.c b/sysdeps/libm-ieee754/w_j1.c
deleted file mode 100644
index 39fe8543b1..0000000000
--- a/sysdeps/libm-ieee754/w_j1.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* @(#)w_j1.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $";
-#endif
-
-/*
- * wrapper of j1,y1
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double j1(double x)		/* wrapper j1 */
-#else
-	double j1(x)			/* wrapper j1 */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_j1(x);
-#else
-	double z;
-	z = __ieee754_j1(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
-	if(fabs(x)>X_TLOSS) {
-	        return __kernel_standard(x,x,36); /* j1(|x|>X_TLOSS) */
-	} else
-	    return z;
-#endif
-}
-#ifdef NO_LONG_DOUBLE
-strong_alias (j1, j1l)
-#endif
-
-
-#ifdef __STDC__
-	double y1(double x)		/* wrapper y1 */
-#else
-	double y1(x)			/* wrapper y1 */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_y1(x);
-#else
-	double z;
-	z = __ieee754_y1(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
-        if(x <= 0.0){
-                if(x==0.0)
-                    /* d= -one/(x-x); */
-                    return __kernel_standard(x,x,10);
-                else
-                    /* d = zero/(x-x); */
-                    return __kernel_standard(x,x,11);
-        }
-	if(x>X_TLOSS) {
-	        return __kernel_standard(x,x,37); /* y1(x>X_TLOSS) */
-	} else
-	    return z;
-#endif
-}
-#ifdef NO_LONG_DOUBLE
-strong_alias (y1, y1l)
-#endif
diff --git a/sysdeps/libm-ieee754/w_j1f.c b/sysdeps/libm-ieee754/w_j1f.c
deleted file mode 100644
index 2a7c8db819..0000000000
--- a/sysdeps/libm-ieee754/w_j1f.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* w_j1f.c -- float version of w_j1.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_j1f.c,v 1.3 1995/05/10 20:49:17 jtc Exp $";
-#endif
-
-/*
- * wrapper of j1f,y1f
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float j1f(float x)		/* wrapper j1f */
-#else
-	float j1f(x)			/* wrapper j1f */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_j1f(x);
-#else
-	float z;
-	z = __ieee754_j1f(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
-	if(fabsf(x)>(float)X_TLOSS) {
-		/* j1(|x|>X_TLOSS) */
-	        return (float)__kernel_standard((double)x,(double)x,136);
-	} else
-	    return z;
-#endif
-}
-
-#ifdef __STDC__
-	float y1f(float x)		/* wrapper y1f */
-#else
-	float y1f(x)			/* wrapper y1f */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_y1f(x);
-#else
-	float z;
-	z = __ieee754_y1f(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
-        if(x <= (float)0.0){
-                if(x==(float)0.0)
-                    /* d= -one/(x-x); */
-                    return (float)__kernel_standard((double)x,(double)x,110);
-                else
-                    /* d = zero/(x-x); */
-                    return (float)__kernel_standard((double)x,(double)x,111);
-        }
-	if(x>(float)X_TLOSS) {
-		/* y1(x>X_TLOSS) */
-	        return (float)__kernel_standard((double)x,(double)x,137);
-	} else
-	    return z;
-#endif
-}
diff --git a/sysdeps/libm-ieee754/w_j1l.c b/sysdeps/libm-ieee754/w_j1l.c
deleted file mode 100644
index 49a486cf8e..0000000000
--- a/sysdeps/libm-ieee754/w_j1l.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* w_j1l.c -- long double version of w_j1.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper of j1l,y1l
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	long double j1l(long double x)	/* wrapper j1l */
-#else
-	long double j1l(x)			/* wrapper j1l */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_j1l(x);
-#else
-	long double z;
-	z = __ieee754_j1l(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
-	if(fabsl(x)>X_TLOSS) {
-	        return __kernel_standard(x,x,236); /* j1(|x|>X_TLOSS) */
-	} else
-	    return z;
-#endif
-}
-
-#ifdef __STDC__
-	long double y1l(long double x)	/* wrapper y1l */
-#else
-	long double y1l(x)			/* wrapper y1l */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_y1l(x);
-#else
-	long double z;
-	z = __ieee754_y1l(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
-        if(x <= 0.0){
-                if(x==0.0)
-                    /* d= -one/(x-x); */
-                    return __kernel_standard(x,x,210);
-                else
-                    /* d = zero/(x-x); */
-                    return __kernel_standard(x,x,211);
-        }
-	if(x>X_TLOSS) {
-	        return __kernel_standard(x,x,237); /* y1(x>X_TLOSS) */
-	} else
-	    return z;
-#endif
-}
diff --git a/sysdeps/libm-ieee754/w_jn.c b/sysdeps/libm-ieee754/w_jn.c
deleted file mode 100644
index 85fc383fb7..0000000000
--- a/sysdeps/libm-ieee754/w_jn.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* @(#)w_jn.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $";
-#endif
-
-/*
- * wrapper jn(int n, double x), yn(int n, double x)
- * floating point Bessel's function of the 1st and 2nd kind
- * of order n
- *
- * Special cases:
- *	y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
- *	y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
- * Note 2. About jn(n,x), yn(n,x)
- *	For n=0, j0(x) is called,
- *	for n=1, j1(x) is called,
- *	for n<x, forward recursion us used starting
- *	from values of j0(x) and j1(x).
- *	for n>x, a continued fraction approximation to
- *	j(n,x)/j(n-1,x) is evaluated and then backward
- *	recursion is used starting from a supposed value
- *	for j(n,x). The resulting value of j(0,x) is
- *	compared with the actual value to correct the
- *	supposed value of j(n,x).
- *
- *	yn(n,x) is similar in all respects, except
- *	that forward recursion is used for all
- *	values of n>1.
- *
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double jn(int n, double x)	/* wrapper jn */
-#else
-	double jn(n,x)			/* wrapper jn */
-	double x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_jn(n,x);
-#else
-	double z;
-	z = __ieee754_jn(n,x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
-	if(fabs(x)>X_TLOSS) {
-	    return __kernel_standard((double)n,x,38); /* jn(|x|>X_TLOSS,n) */
-	} else
-	    return z;
-#endif
-}
-#ifdef NO_LONG_DOUBLE
-strong_alias (jn, jnl)
-#endif
-
-
-#ifdef __STDC__
-	double yn(int n, double x)	/* wrapper yn */
-#else
-	double yn(n,x)			/* wrapper yn */
-	double x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_yn(n,x);
-#else
-	double z;
-	z = __ieee754_yn(n,x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
-        if(x <= 0.0){
-                if(x==0.0)
-                    /* d= -one/(x-x); */
-                    return __kernel_standard((double)n,x,12);
-                else
-                    /* d = zero/(x-x); */
-                    return __kernel_standard((double)n,x,13);
-        }
-	if(x>X_TLOSS) {
-	    return __kernel_standard((double)n,x,39); /* yn(x>X_TLOSS,n) */
-	} else
-	    return z;
-#endif
-}
-#ifdef NO_LONG_DOUBLE
-strong_alias (yn, ynl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_jnf.c b/sysdeps/libm-ieee754/w_jnf.c
deleted file mode 100644
index 63ad335573..0000000000
--- a/sysdeps/libm-ieee754/w_jnf.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* w_jnf.c -- float version of w_jn.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_jnf.c,v 1.3 1995/05/10 20:49:21 jtc Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float jnf(int n, float x)	/* wrapper jnf */
-#else
-	float jnf(n,x)			/* wrapper jnf */
-	float x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_jnf(n,x);
-#else
-	float z;
-	z = __ieee754_jnf(n,x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
-	if(fabsf(x)>(float)X_TLOSS) {
-	    /* jn(|x|>X_TLOSS,n) */
-	    return (float)__kernel_standard((double)n,(double)x,138);
-	} else
-	    return z;
-#endif
-}
-
-#ifdef __STDC__
-	float ynf(int n, float x)	/* wrapper ynf */
-#else
-	float ynf(n,x)			/* wrapper ynf */
-	float x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_ynf(n,x);
-#else
-	float z;
-	z = __ieee754_ynf(n,x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
-        if(x <= (float)0.0){
-                if(x==(float)0.0)
-                    /* d= -one/(x-x); */
-                    return (float)__kernel_standard((double)n,(double)x,112);
-                else
-                    /* d = zero/(x-x); */
-                    return (float)__kernel_standard((double)n,(double)x,113);
-        }
-	if(x>(float)X_TLOSS) {
-	    /* yn(x>X_TLOSS,n) */
-	    return (float)__kernel_standard((double)n,(double)x,139);
-	} else
-	    return z;
-#endif
-}
diff --git a/sysdeps/libm-ieee754/w_jnl.c b/sysdeps/libm-ieee754/w_jnl.c
deleted file mode 100644
index 866e3cdb00..0000000000
--- a/sysdeps/libm-ieee754/w_jnl.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/* w_jnl.c -- long double version of w_jn.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper jn(int n, double x), yn(int n, double x)
- * floating point Bessel's function of the 1st and 2nd kind
- * of order n
- *
- * Special cases:
- *	y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
- *	y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
- * Note 2. About jn(n,x), yn(n,x)
- *	For n=0, j0(x) is called,
- *	for n=1, j1(x) is called,
- *	for n<x, forward recursion us used starting
- *	from values of j0(x) and j1(x).
- *	for n>x, a continued fraction approximation to
- *	j(n,x)/j(n-1,x) is evaluated and then backward
- *	recursion is used starting from a supposed value
- *	for j(n,x). The resulting value of j(0,x) is
- *	compared with the actual value to correct the
- *	supposed value of j(n,x).
- *
- *	yn(n,x) is similar in all respects, except
- *	that forward recursion is used for all
- *	values of n>1.
- *
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	long double jnl(int n, long double x)	/* wrapper jnl */
-#else
-	long double jnl(n,x)			/* wrapper jnl */
-	long double x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_jnl(n,x);
-#else
-	long double z;
-	z = __ieee754_jnl(n,x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
-	if(fabsl(x)>X_TLOSS) {
-	    return __kernel_standard((double)n,x,238); /* jn(|x|>X_TLOSS,n) */
-	} else
-	    return z;
-#endif
-}
-
-#ifdef __STDC__
-	long double ynl(int n, long double x)	/* wrapper ynl */
-#else
-	long double ynl(n,x)			/* wrapper ynl */
-	long double x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_ynl(n,x);
-#else
-	long double z;
-	z = __ieee754_ynl(n,x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
-        if(x <= 0.0){
-                if(x==0.0)
-                    /* d= -one/(x-x); */
-                    return __kernel_standard((double)n,x,212);
-                else
-                    /* d = zero/(x-x); */
-                    return __kernel_standard((double)n,x,213);
-        }
-	if(x>X_TLOSS) {
-	    return __kernel_standard((double)n,x,239); /* yn(x>X_TLOSS,n) */
-	} else
-	    return z;
-#endif
-}
diff --git a/sysdeps/libm-ieee754/w_lgamma.c b/sysdeps/libm-ieee754/w_lgamma.c
deleted file mode 100644
index 0cc62a1784..0000000000
--- a/sysdeps/libm-ieee754/w_lgamma.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* @(#)w_lgamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_lgamma.c,v 1.6 1995/05/10 20:49:24 jtc Exp $";
-#endif
-
-/* double lgamma(double x)
- * Return the logarithm of the Gamma function of x.
- *
- * Method: call __ieee754_lgamma_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double __lgamma(double x)
-#else
-	double __lgamma(x)
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_lgamma_r(x,&signgam);
-#else
-        double y;
-	int local_signgam;
-        y = __ieee754_lgamma_r(x,&local_signgam);
-	if (_LIB_VERSION != _ISOC_)
-	  /* ISO C 9x does not define the global variable.  */
-	  signgam = local_signgam;
-        if(_LIB_VERSION == _IEEE_) return y;
-        if(!__finite(y)&&__finite(x)) {
-            if(__floor(x)==x&&x<=0.0)
-                return __kernel_standard(x,x,15); /* lgamma pole */
-            else
-                return __kernel_standard(x,x,14); /* lgamma overflow */
-        } else
-            return y;
-#endif
-}
-weak_alias (__lgamma, lgamma)
-strong_alias (__lgamma, __gamma)
-weak_alias (__gamma, gamma)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lgamma, __lgammal)
-weak_alias (__lgamma, lgammal)
-strong_alias (__gamma, __gammal)
-weak_alias (__gamma, gammal)
-#endif
diff --git a/sysdeps/libm-ieee754/w_lgamma_r.c b/sysdeps/libm-ieee754/w_lgamma_r.c
deleted file mode 100644
index f3e7d821e2..0000000000
--- a/sysdeps/libm-ieee754/w_lgamma_r.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* @(#)wr_lgamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_lgamma_r.c,v 1.6 1995/05/10 20:49:27 jtc Exp $";
-#endif
-
-/*
- * wrapper double lgamma_r(double x, int *signgamp)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __lgamma_r(double x, int *signgamp) /* wrapper lgamma_r */
-#else
-	double __lgamma_r(x,signgamp)              /* wrapper lgamma_r */
-        double x; int *signgamp;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_lgamma_r(x,signgamp);
-#else
-        double y;
-        y = __ieee754_lgamma_r(x,signgamp);
-        if(_LIB_VERSION == _IEEE_) return y;
-        if(!__finite(y)&&__finite(x)) {
-            if(__floor(x)==x&&x<=0.0)
-                return __kernel_standard(x,x,15); /* lgamma pole */
-            else
-                return __kernel_standard(x,x,14); /* lgamma overflow */
-        } else
-            return y;
-#endif
-}
-weak_alias (__lgamma_r, lgamma_r)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lgamma_r, __lgammal_r)
-weak_alias (__lgamma_r, lgammal_r)
-#endif
diff --git a/sysdeps/libm-ieee754/w_lgammaf.c b/sysdeps/libm-ieee754/w_lgammaf.c
deleted file mode 100644
index 4c64aa4130..0000000000
--- a/sysdeps/libm-ieee754/w_lgammaf.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* w_lgammaf.c -- float version of w_lgamma.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_lgammaf.c,v 1.3 1995/05/10 20:49:30 jtc Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float __lgammaf(float x)
-#else
-	float __lgammaf(x)
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_lgammaf_r(x,&signgam);
-#else
-        float y;
-	int local_signgam;
-        y = __ieee754_lgammaf_r(x,&local_signgam);
-	if (_LIB_VERSION != _ISOC_)
-	  /* ISO C 9x does not define the global variable.  */
-	  signgam = local_signgam;
-        if(_LIB_VERSION == _IEEE_) return y;
-        if(!__finitef(y)&&__finitef(x)) {
-            if(__floorf(x)==x&&x<=(float)0.0)
-	        /* lgamma pole */
-                return (float)__kernel_standard((double)x,(double)x,115);
-            else
-	        /* lgamma overflow */
-                return (float)__kernel_standard((double)x,(double)x,114);
-        } else
-            return y;
-#endif
-}
-weak_alias (__lgammaf, lgammaf)
-strong_alias (__lgammaf, __gammaf)
-weak_alias (__gammaf, gammaf)
diff --git a/sysdeps/libm-ieee754/w_lgammaf_r.c b/sysdeps/libm-ieee754/w_lgammaf_r.c
deleted file mode 100644
index 66962acc7e..0000000000
--- a/sysdeps/libm-ieee754/w_lgammaf_r.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* w_lgammaf_r.c -- float version of w_lgamma_r.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_lgammaf_r.c,v 1.3 1995/05/10 20:49:32 jtc Exp $";
-#endif
-
-/* 
- * wrapper float lgammaf_r(float x, int *signgamp)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __lgammaf_r(float x, int *signgamp) /* wrapper lgammaf_r */
-#else
-	float __lgammaf_r(x,signgamp)              /* wrapper lgammaf_r */
-        float x; int *signgamp;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_lgammaf_r(x,signgamp);
-#else
-        float y;
-        y = __ieee754_lgammaf_r(x,signgamp);
-        if(_LIB_VERSION == _IEEE_) return y;
-        if(!__finitef(y)&&__finitef(x)) {
-            if(__floorf(x)==x&&x<=(float)0.0)
-	        /* lgamma pole */
-                return (float)__kernel_standard((double)x,(double)x,115);
-            else
-	        /* lgamma overflow */
-	        return (float)__kernel_standard((double)x,(double)x,114);
-        } else
-            return y;
-#endif
-}             
-weak_alias (__lgammaf_r, lgammaf_r)
diff --git a/sysdeps/libm-ieee754/w_lgammal.c b/sysdeps/libm-ieee754/w_lgammal.c
deleted file mode 100644
index 41104e47e4..0000000000
--- a/sysdeps/libm-ieee754/w_lgammal.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* w_lgammal.c -- long double version of w_lgamma.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/* long double lgammal(long double x)
- * Return the logarithm of the Gamma function of x.
- *
- * Method: call __ieee754_lgammal_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	long double __lgammal(long double x)
-#else
-	long double __lgammal(x)
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_lgammal_r(x,&signgam);
-#else
-        long double y;
-	int local_signgam;
-        y = __ieee754_lgammal_r(x,&local_signgam);
-	if (_LIB_VERSION != _ISOC_)
-	  /* ISO C 9x does not define the global variable.  */
-	  signgam = local_signgam;
-        if(_LIB_VERSION == _IEEE_) return y;
-        if(!__finitel(y)&&__finitel(x)) {
-            if(__floorl(x)==x&&x<=0.0)
-                return __kernel_standard(x,x,215); /* lgamma pole */
-            else
-                return __kernel_standard(x,x,214); /* lgamma overflow */
-        } else
-            return y;
-#endif
-}
-weak_alias (__lgammal, lgammal)
-strong_alias (__lgammal, __gammal)
-weak_alias (__gammal, gammal)
diff --git a/sysdeps/libm-ieee754/w_lgammal_r.c b/sysdeps/libm-ieee754/w_lgammal_r.c
deleted file mode 100644
index 71f5c005d0..0000000000
--- a/sysdeps/libm-ieee754/w_lgammal_r.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* w_lgammal_r.c -- long double version of w_lgamma_r.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper long double lgammal_r(long double x, int *signgamp)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	long double __lgammal_r(long double x, int *signgamp)
-		/* wrapper lgamma_r */
-#else
-	long double __lgammal_r(x,signgamp)             /* wrapper lgamma_r */
-        long double x; int *signgamp;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_lgammal_r(x,signgamp);
-#else
-        long double y;
-        y = __ieee754_lgammal_r(x,signgamp);
-        if(_LIB_VERSION == _IEEE_) return y;
-        if(!__finitel(y)&&__finitel(x)) {
-            if(__floorl(x)==x&&x<=0.0)
-                return __kernel_standard(x,x,215); /* lgamma pole */
-            else
-                return __kernel_standard(x,x,214); /* lgamma overflow */
-        } else
-            return y;
-#endif
-}
-weak_alias (__lgammal_r, lgammal_r)
diff --git a/sysdeps/libm-ieee754/w_log.c b/sysdeps/libm-ieee754/w_log.c
deleted file mode 100644
index 5f0af79731..0000000000
--- a/sysdeps/libm-ieee754/w_log.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* @(#)w_log.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_log.c,v 1.6 1995/05/10 20:49:33 jtc Exp $";
-#endif
-
-/*
- * wrapper log(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __log(double x)		/* wrapper log */
-#else
-	double __log(x)			/* wrapper log */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_log(x);
-#else
-	double z;
-	z = __ieee754_log(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x) || x > 0.0) return z;
-	if(x==0.0)
-	    return __kernel_standard(x,x,16); /* log(0) */
-	else
-	    return __kernel_standard(x,x,17); /* log(x<0) */
-#endif
-}
-weak_alias (__log, log)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__log, __logl)
-weak_alias (__log, logl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_log10.c b/sysdeps/libm-ieee754/w_log10.c
deleted file mode 100644
index 8a0a70bdf7..0000000000
--- a/sysdeps/libm-ieee754/w_log10.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* @(#)w_log10.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_log10.c,v 1.6 1995/05/10 20:49:35 jtc Exp $";
-#endif
-
-/*
- * wrapper log10(X)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __log10(double x)		/* wrapper log10 */
-#else
-	double __log10(x)			/* wrapper log10 */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_log10(x);
-#else
-	double z;
-	z = __ieee754_log10(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
-	if(x<=0.0) {
-	    if(x==0.0)
-	        return __kernel_standard(x,x,18); /* log10(0) */
-	    else
-	        return __kernel_standard(x,x,19); /* log10(x<0) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__log10, log10)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__log10, __log10l)
-weak_alias (__log10, log10l)
-#endif
diff --git a/sysdeps/libm-ieee754/w_log10f.c b/sysdeps/libm-ieee754/w_log10f.c
deleted file mode 100644
index f90cb0cabc..0000000000
--- a/sysdeps/libm-ieee754/w_log10f.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* w_log10f.c -- float version of w_log10.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_log10f.c,v 1.3 1995/05/10 20:49:37 jtc Exp $";
-#endif
-
-/* 
- * wrapper log10f(X)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __log10f(float x)		/* wrapper log10f */
-#else
-	float __log10f(x)			/* wrapper log10f */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_log10f(x);
-#else
-	float z;
-	z = __ieee754_log10f(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
-	if(x<=(float)0.0) {
-	    if(x==(float)0.0)
-	        /* log10(0) */
-	        return (float)__kernel_standard((double)x,(double)x,118);
-	    else 
-	        /* log10(x<0) */
-	        return (float)__kernel_standard((double)x,(double)x,119);
-	} else
-	    return z;
-#endif
-}
-weak_alias (__log10f, log10f)
diff --git a/sysdeps/libm-ieee754/w_log10l.c b/sysdeps/libm-ieee754/w_log10l.c
deleted file mode 100644
index 0d0861689d..0000000000
--- a/sysdeps/libm-ieee754/w_log10l.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* w_log10l.c -- long double version of w_log10.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper log10l(X)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	long double __log10l(long double x)	/* wrapper log10l */
-#else
-	long double __log10l(x)			/* wrapper log10l */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_log10l(x);
-#else
-	long double z;
-	z = __ieee754_log10l(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
-	if(x<=0.0) {
-	    if(x==0.0)
-	        return __kernel_standard(x,x,218); /* log10(0) */
-	    else
-	        return __kernel_standard(x,x,219); /* log10(x<0) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__log10l, log10l)
diff --git a/sysdeps/libm-ieee754/w_logf.c b/sysdeps/libm-ieee754/w_logf.c
deleted file mode 100644
index 9eabe4b34c..0000000000
--- a/sysdeps/libm-ieee754/w_logf.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* w_logf.c -- float version of w_log.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_logf.c,v 1.3 1995/05/10 20:49:40 jtc Exp $";
-#endif
-
-/*
- * wrapper logf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __logf(float x)		/* wrapper logf */
-#else
-	float __logf(x)			/* wrapper logf */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_logf(x);
-#else
-	float z;
-	z = __ieee754_logf(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x) || x > (float)0.0) return z;
-	if(x==(float)0.0)
-	    /* logf(0) */
-	    return (float)__kernel_standard((double)x,(double)x,116);
-	else 
-	    /* logf(x<0) */
-	    return (float)__kernel_standard((double)x,(double)x,117);
-#endif
-}
-weak_alias (__logf, logf)
diff --git a/sysdeps/libm-ieee754/w_logl.c b/sysdeps/libm-ieee754/w_logl.c
deleted file mode 100644
index bb979c26c3..0000000000
--- a/sysdeps/libm-ieee754/w_logl.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_logl.c -- long double version of w_log.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper logl(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	long double __logl(long double x)	/* wrapper logl */
-#else
-	long double __logl(x)			/* wrapper logl */
-	long double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_logl(x);
-#else
-	long double z;
-	z = __ieee754_logl(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(x) || x > 0.0) return z;
-	if(x==0.0)
-	    return __kernel_standard(x,x,216); /* log(0) */
-	else
-	    return __kernel_standard(x,x,217); /* log(x<0) */
-#endif
-}
-weak_alias (__logl, logl)
diff --git a/sysdeps/libm-ieee754/w_pow.c b/sysdeps/libm-ieee754/w_pow.c
deleted file mode 100644
index 5850651a1a..0000000000
--- a/sysdeps/libm-ieee754/w_pow.c
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-/* @(#)w_pow.c 5.2 93/10/01 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * wrapper pow(x,y) return x**y
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	double __pow(double x, double y)	/* wrapper pow */
-#else
-	double __pow(x,y)			/* wrapper pow */
-	double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return  __ieee754_pow(x,y);
-#else
-	double z;
-	z=__ieee754_pow(x,y);
-	if(_LIB_VERSION == _IEEE_|| __isnan(y)) return z;
-	if(__isnan(x)) {
-	    if(y==0.0)
-	        return __kernel_standard(x,y,42); /* pow(NaN,0.0) */
-	    else
-		return z;
-	}
-	if(x==0.0) {
-	    if(y==0.0)
-	        return __kernel_standard(x,y,20); /* pow(0.0,0.0) */
-	    if(__finite(y)&&y<0.0) {
-	      if (signbit (x) && signbit (z))
-	        return __kernel_standard(x,y,23); /* pow(-0.0,negative) */
-	      else
-	        return __kernel_standard(x,y,43); /* pow(+0.0,negative) */
-	    }
-	    return z;
-	}
-	if(!__finite(z)) {
-	    if(__finite(x)&&__finite(y)) {
-	        if(__isnan(z))
-	            return __kernel_standard(x,y,24); /* pow neg**non-int */
-	        else
-	            return __kernel_standard(x,y,21); /* pow overflow */
-	    }
-	}
-	if(z==0.0&&__finite(x)&&__finite(y))
-	    return __kernel_standard(x,y,22); /* pow underflow */
-	return z;
-#endif
-}
-weak_alias (__pow, pow)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__pow, __powl)
-weak_alias (__pow, powl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_powf.c b/sysdeps/libm-ieee754/w_powf.c
deleted file mode 100644
index 32196fd89f..0000000000
--- a/sysdeps/libm-ieee754/w_powf.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* w_powf.c -- float version of w_pow.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_powf.c,v 1.3 1995/05/10 20:49:41 jtc Exp $";
-#endif
-
-/*
- * wrapper powf(x,y) return x**y
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	float __powf(float x, float y)	/* wrapper powf */
-#else
-	float __powf(x,y)			/* wrapper powf */
-	float x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return  __ieee754_powf(x,y);
-#else
-	float z;
-	z=__ieee754_powf(x,y);
-	if(_LIB_VERSION == _IEEE_|| __isnanf(y)) return z;
-	if(__isnanf(x)) {
-	    if(y==(float)0.0)
-	        /* powf(NaN,0.0) */
-	        return (float)__kernel_standard((double)x,(double)y,142);
-	    else
-		return z;
-	}
-	if(x==(float)0.0) {
-	    if(y==(float)0.0)
-	        /* powf(0.0,0.0) */
-	        return (float)__kernel_standard((double)x,(double)y,120);
-	    if(__finitef(y)&&y<(float)0.0) {
-	      if (signbit (x) && signbit (z))
-	        /* powf(0.0,negative) */
-	        return (float)__kernel_standard((double)x,(double)y,123);
-	      else
-	        return (float)__kernel_standard((double)x,(double)y,143);
-	    }
-	    return z;
-	}
-	if(!__finitef(z)) {
-	    if(__finitef(x)&&__finitef(y)) {
-	        if(__isnanf(z))
-		    /* powf neg**non-int */
-	            return (float)__kernel_standard((double)x,(double)y,124);
-	        else
-		    /* powf overflow */
-	            return (float)__kernel_standard((double)x,(double)y,121);
-	    }
-	}
-	if(z==(float)0.0&&__finitef(x)&&__finitef(y))
-	    /* powf underflow */
-	    return (float)__kernel_standard((double)x,(double)y,122);
-	return z;
-#endif
-}
-weak_alias (__powf, powf)
diff --git a/sysdeps/libm-ieee754/w_powl.c b/sysdeps/libm-ieee754/w_powl.c
deleted file mode 100644
index 17feb9fc61..0000000000
--- a/sysdeps/libm-ieee754/w_powl.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* w_powl.c -- long double version of w_pow.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * wrapper powl(x,y) return x**y
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
-	long double __powl(long double x, long double y)/* wrapper powl */
-#else
-	long double __powl(x,y)			/* wrapper powl */
-	long double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return  __ieee754_powl(x,y);
-#else
-	long double z;
-	z=__ieee754_powl(x,y);
-	if(_LIB_VERSION == _IEEE_|| __isnanl(y)) return z;
-	if(__isnanl(x)) {
-	    if(y==0.0)
-	        return __kernel_standard(x,y,242); /* pow(NaN,0.0) */
-	    else
-		return z;
-	}
-	if(x==0.0) {
-	    if(y==0.0)
-	        return __kernel_standard(x,y,220); /* pow(0.0,0.0) */
-	    if(__finitel(y)&&y<0.0) {
-	      if (signbit (x) && signbit (z))
-	        return __kernel_standard(x,y,223); /* pow(-0.0,negative) */
-	      else
-	        return __kernel_standard(x,y,243); /* pow(+0.0,negative) */
-	    }
-	    return z;
-	}
-	if(!__finitel(z)) {
-	    if(__finitel(x)&&__finitel(y)) {
-	        if(__isnanl(z))
-	            return __kernel_standard(x,y,224); /* pow neg**non-int */
-	        else
-	            return __kernel_standard(x,y,221); /* pow overflow */
-	    }
-	}
-	if(z==0.0&&__finitel(x)&&__finitel(y))
-	    return __kernel_standard(x,y,222); /* pow underflow */
-	return z;
-#endif
-}
-weak_alias (__powl, powl)
diff --git a/sysdeps/libm-ieee754/w_remainder.c b/sysdeps/libm-ieee754/w_remainder.c
deleted file mode 100644
index d85a3febce..0000000000
--- a/sysdeps/libm-ieee754/w_remainder.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* @(#)w_remainder.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_remainder.c,v 1.6 1995/05/10 20:49:44 jtc Exp $";
-#endif
-
-/*
- * wrapper remainder(x,p)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double __remainder(double x, double y)	/* wrapper remainder */
-#else
-	double __remainder(x,y)			/* wrapper remainder */
-	double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_remainder(x,y);
-#else
-	double z;
-	z = __ieee754_remainder(x,y);
-	if(_LIB_VERSION == _IEEE_ || __isnan(y)) return z;
-	if(y==0.0)
-	    return __kernel_standard(x,y,28); /* remainder(x,0) */
-	else
-	    return z;
-#endif
-}
-weak_alias (__remainder, remainder)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__remainder, __remainderl)
-weak_alias (__remainder, remainderl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_remainderf.c b/sysdeps/libm-ieee754/w_remainderf.c
deleted file mode 100644
index 58255f5be5..0000000000
--- a/sysdeps/libm-ieee754/w_remainderf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_remainderf.c -- float version of w_remainder.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_remainderf.c,v 1.3 1995/05/10 20:49:46 jtc Exp $";
-#endif
-
-/* 
- * wrapper remainderf(x,p)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float __remainderf(float x, float y)	/* wrapper remainder */
-#else
-	float __remainderf(x,y)			/* wrapper remainder */
-	float x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_remainderf(x,y);
-#else
-	float z;
-	z = __ieee754_remainderf(x,y);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(y)) return z;
-	if(y==(float)0.0) 
-	    /* remainder(x,0) */
-	    return (float)__kernel_standard((double)x,(double)y,128);
-	else
-	    return z;
-#endif
-}
-weak_alias (__remainderf, remainderf)
diff --git a/sysdeps/libm-ieee754/w_remainderl.c b/sysdeps/libm-ieee754/w_remainderl.c
deleted file mode 100644
index 284140174d..0000000000
--- a/sysdeps/libm-ieee754/w_remainderl.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_remainderl.c -- long double version of w_remainder.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper remainderl(x,p)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	long double __remainderl(long double x, long double y)
-		/* wrapper remainderl */
-#else
-	long double __remainderl(x,y)			/* wrapper remainder */
-	long double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_remainderl(x,y);
-#else
-	long double z;
-	z = __ieee754_remainderl(x,y);
-	if(_LIB_VERSION == _IEEE_ || __isnanl(y)) return z;
-	if(y==0.0)
-	    return __kernel_standard(x,y,228); /* remainder(x,0) */
-	else
-	    return z;
-#endif
-}
-weak_alias (__remainderl, remainderl)
diff --git a/sysdeps/libm-ieee754/w_scalb.c b/sysdeps/libm-ieee754/w_scalb.c
deleted file mode 100644
index e5c407a435..0000000000
--- a/sysdeps/libm-ieee754/w_scalb.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* @(#)w_scalb.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_scalb.c,v 1.6 1995/05/10 20:49:48 jtc Exp $";
-#endif
-
-/*
- * wrapper scalb(double x, double fn) is provide for
- * passing various standard test suite. One
- * should use scalbn() instead.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#include <errno.h>
-
-#ifdef __STDC__
-#ifdef _SCALB_INT
-	double __scalb(double x, int fn)		/* wrapper scalb */
-#else
-	double __scalb(double x, double fn)	/* wrapper scalb */
-#endif
-#else
-	double __scalb(x,fn)			/* wrapper scalb */
-#ifdef _SCALB_INT
-	double x; int fn;
-#else
-	double x,fn;
-#endif
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_scalb(x,fn);
-#else
-	double z;
-	z = __ieee754_scalb(x,fn);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if(!(__finite(z)||__isnan(z))&&__finite(x)) {
-	    return __kernel_standard(x,(double)fn,32); /* scalb overflow */
-	}
-	if(z==0.0&&z!=x) {
-	    return __kernel_standard(x,(double)fn,33); /* scalb underflow */
-	}
-#ifndef _SCALB_INT
-	if(!__finite(fn)) __set_errno (ERANGE);
-#endif
-	return z;
-#endif
-}
-weak_alias (__scalb, scalb)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__scalb, __scalbl)
-weak_alias (__scalb, scalbl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_scalbf.c b/sysdeps/libm-ieee754/w_scalbf.c
deleted file mode 100644
index 488a717503..0000000000
--- a/sysdeps/libm-ieee754/w_scalbf.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* w_scalbf.c -- float version of w_scalb.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_scalbf.c,v 1.3 1995/05/10 20:49:50 jtc Exp $";
-#endif
-
-/*
- * wrapper scalbf(float x, float fn) is provide for
- * passing various standard test suite. One
- * should use scalbn() instead.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#include <errno.h>
-
-#ifdef __STDC__
-#ifdef _SCALB_INT
-	float __scalbf(float x, int fn)		/* wrapper scalbf */
-#else
-	float __scalbf(float x, float fn)		/* wrapper scalbf */
-#endif
-#else
-	float __scalbf(x,fn)			/* wrapper scalbf */
-#ifdef _SCALB_INT
-	float x; int fn;
-#else
-	float x,fn;
-#endif
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_scalbf(x,fn);
-#else
-	float z;
-	z = __ieee754_scalbf(x,fn);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if(!(__finitef(z)||__isnanf(z))&&__finitef(x)) {
-	    /* scalbf overflow */
-	    return (float)__kernel_standard((double)x,(double)fn,132);
-	}
-	if(z==(float)0.0&&z!=x) {
-	    /* scalbf underflow */
-	    return (float)__kernel_standard((double)x,(double)fn,133);
-	}
-#ifndef _SCALB_INT
-	if(!__finitef(fn)) __set_errno (ERANGE);
-#endif
-	return z;
-#endif
-}
-weak_alias (__scalbf, scalbf)
diff --git a/sysdeps/libm-ieee754/w_scalbl.c b/sysdeps/libm-ieee754/w_scalbl.c
deleted file mode 100644
index 3ca8d9601d..0000000000
--- a/sysdeps/libm-ieee754/w_scalbl.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* w_scalbl.c -- long double version of w_scalb.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper scalbl(long double x, long double fn) is provide for
- * passing various standard test suite. One
- * should use scalbnl() instead.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#include <errno.h>
-
-#ifdef __STDC__
-#ifdef _SCALB_INT
-	long double __scalbl(long double x, int fn)	/* wrapper scalbl */
-#else
-	long double __scalbl(long double x, long double fn)/* wrapper scalbl */
-#endif
-#else
-	long double __scalbl(x,fn)			/* wrapper scalbl */
-#ifdef _SCALB_INT
-	long double x; int fn;
-#else
-	long double x,fn;
-#endif
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_scalbl(x,fn);
-#else
-	long double z;
-	z = __ieee754_scalbl(x,fn);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if(!(__finitel(z)||__isnanl(z))&&__finitel(x)) {
-	    return __kernel_standard(x,(double)fn,232); /* scalb overflow */
-	}
-	if(z==0.0&&z!=x) {
-	    return __kernel_standard(x,(double)fn,233); /* scalb underflow */
-	}
-#ifndef _SCALB_INT
-	if(!__finitel(fn)) __set_errno (ERANGE);
-#endif
-	return z;
-#endif
-}
-weak_alias (__scalbl, scalbl)
diff --git a/sysdeps/libm-ieee754/w_sinh.c b/sysdeps/libm-ieee754/w_sinh.c
deleted file mode 100644
index 9b34cd1873..0000000000
--- a/sysdeps/libm-ieee754/w_sinh.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* @(#)w_sinh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_sinh.c,v 1.6 1995/05/10 20:49:51 jtc Exp $";
-#endif
-
-/*
- * wrapper sinh(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double __sinh(double x)		/* wrapper sinh */
-#else
-	double __sinh(x)			/* wrapper sinh */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_sinh(x);
-#else
-	double z;
-	z = __ieee754_sinh(x);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if(!__finite(z)&&__finite(x)) {
-	    return __kernel_standard(x,x,25); /* sinh overflow */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__sinh, sinh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__sinh, __sinhl)
-weak_alias (__sinh, sinhl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_sinhf.c b/sysdeps/libm-ieee754/w_sinhf.c
deleted file mode 100644
index a69cf3072d..0000000000
--- a/sysdeps/libm-ieee754/w_sinhf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_sinhf.c -- float version of w_sinh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_sinhf.c,v 1.3 1995/05/10 20:49:54 jtc Exp $";
-#endif
-
-/* 
- * wrapper sinhf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float __sinhf(float x)		/* wrapper sinhf */
-#else
-	float __sinhf(x)			/* wrapper sinhf */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_sinhf(x);
-#else
-	float z; 
-	z = __ieee754_sinhf(x);
-	if(_LIB_VERSION == _IEEE_) return z;
-	if(!__finitef(z)&&__finitef(x)) {
-	    /* sinhf overflow */
-	    return (float)__kernel_standard((double)x,(double)x,125);
-	} else
-	    return z;
-#endif
-}
-weak_alias (__sinhf, sinhf)
diff --git a/sysdeps/libm-ieee754/w_sqrt.c b/sysdeps/libm-ieee754/w_sqrt.c
deleted file mode 100644
index be15d959ea..0000000000
--- a/sysdeps/libm-ieee754/w_sqrt.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* @(#)w_sqrt.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_sqrt.c,v 1.6 1995/05/10 20:49:55 jtc Exp $";
-#endif
-
-/*
- * wrapper sqrt(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double __sqrt(double x)		/* wrapper sqrt */
-#else
-	double __sqrt(x)			/* wrapper sqrt */
-	double x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_sqrt(x);
-#else
-	double z;
-	z = __ieee754_sqrt(x);
-	if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
-	if(x<0.0) {
-	    return __kernel_standard(x,x,26); /* sqrt(negative) */
-	} else
-	    return z;
-#endif
-}
-weak_alias (__sqrt, sqrt)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__sqrt, __sqrtl)
-weak_alias (__sqrt, sqrtl)
-#endif
diff --git a/sysdeps/libm-ieee754/w_sqrtf.c b/sysdeps/libm-ieee754/w_sqrtf.c
deleted file mode 100644
index f5ccc73868..0000000000
--- a/sysdeps/libm-ieee754/w_sqrtf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_sqrtf.c -- float version of w_sqrt.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_sqrtf.c,v 1.3 1995/05/10 20:49:59 jtc Exp $";
-#endif
-
-/* 
- * wrapper sqrtf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float __sqrtf(float x)		/* wrapper sqrtf */
-#else
-	float sqrt(x)			/* wrapper sqrtf */
-	float x;
-#endif
-{
-#ifdef _IEEE_LIBM
-	return __ieee754_sqrtf(x);
-#else
-	float z;
-	z = __ieee754_sqrtf(x);
-	if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
-	if(x<(float)0.0) {
-	    /* sqrtf(negative) */
-	    return (float)__kernel_standard((double)x,(double)x,126);
-	} else
-	    return z;
-#endif
-}
-weak_alias (__sqrtf, sqrtf)
diff --git a/sysdeps/libm-ieee754/w_tgamma.c b/sysdeps/libm-ieee754/w_tgamma.c
deleted file mode 100644
index 2adbc2e14d..0000000000
--- a/sysdeps/libm-ieee754/w_tgamma.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* @(#)w_gamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_gamma.c,v 1.7 1995/11/20 22:06:43 jtc Exp $";
-#endif
-
-/* double gamma(double x)
- * Return  the logarithm of the Gamma function of x or the Gamma function of x,
- * depending on the library mode.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	double __tgamma(double x)
-#else
-	double __tgamma(x)
-	double x;
-#endif
-{
-        double y;
-	int local_signgam;
-	y = __ieee754_gamma_r(x,&local_signgam);
-	if (local_signgam < 0) y = -y;
-#ifdef _IEEE_LIBM
-	return y;
-#else
-	if(_LIB_VERSION == _IEEE_) return y;
-
-	if(!__finite(y)&&__finite(x)) {
-	  if(__floor(x)==x&&x<=0.0)
-	    return __kernel_standard(x,x,41); /* tgamma pole */
-	  else
-	    return __kernel_standard(x,x,40); /* tgamma overflow */
-	}
-	return y;
-#endif
-}
-weak_alias (__tgamma, tgamma)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__tgamma, __tgammal)
-weak_alias (__tgamma, tgammal)
-#endif
diff --git a/sysdeps/libm-ieee754/w_tgammaf.c b/sysdeps/libm-ieee754/w_tgammaf.c
deleted file mode 100644
index 152f4be156..0000000000
--- a/sysdeps/libm-ieee754/w_tgammaf.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* w_gammaf.c -- float version of w_gamma.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_gammaf.c,v 1.4 1995/11/20 22:06:48 jtc Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	float __tgammaf(float x)
-#else
-	float __tgammaf(x)
-	float x;
-#endif
-{
-        float y;
-	int local_signgam;
-	y = __ieee754_gammaf_r(x,&local_signgam);
-	if (local_signgam < 0) y = -y;
-#ifdef _IEEE_LIBM
-	return y;
-#else
-	if(_LIB_VERSION == _IEEE_) return y;
-
-	if(!__finitef(y)&&__finitef(x)) {
-	  if(__floorf(x)==x&&x<=(float)0.0)
-	    /* tgammaf pole */
-	    return (float)__kernel_standard((double)x,(double)x,141);
-	  else
-	    /* tgammaf overflow */
-	    return (float)__kernel_standard((double)x,(double)x,140);
-	}
-	return y;
-#endif
-}
-weak_alias (__tgammaf, tgammaf)
diff --git a/sysdeps/libm-ieee754/w_tgammal.c b/sysdeps/libm-ieee754/w_tgammal.c
deleted file mode 100644
index 9efce2bb95..0000000000
--- a/sysdeps/libm-ieee754/w_tgammal.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* w_gammal.c -- long double version of w_gamma.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/* long double gammal(double x)
- * Return the Gamma function of x.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-	long double __tgammal(long double x)
-#else
-	long double __tgammal(x)
-	long double x;
-#endif
-{
-        long double y;
-	int local_signgam;
-	y = __ieee754_gammal_r(x,&local_signgam);
-	if (local_signgam < 0) y = -y;
-#ifdef _IEEE_LIBM
-	return y;
-#else
-	if(_LIB_VERSION == _IEEE_) return y;
-
-	if(!__finitel(y)&&__finitel(x)) {
-	  if(__floorl(x)==x&&x<=0.0)
-	    return __kernel_standard(x,x,241); /* tgamma pole */
-	  else
-	    return __kernel_standard(x,x,240); /* tgamma overflow */
-	}
-	return y;
-#endif
-}
-weak_alias (__tgammal, tgammal)
diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies
index 09dd873973..b64e753525 100644
--- a/sysdeps/m68k/Implies
+++ b/sysdeps/m68k/Implies
@@ -1,3 +1,5 @@
 wordsize-32
 # 68k uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
+ieee754/ldbl-96
diff --git a/sysdeps/m68k/printf_fphex.c b/sysdeps/m68k/printf_fphex.c
index 0e68b16b77..d021a090ab 100644
--- a/sysdeps/m68k/printf_fphex.c
+++ b/sysdeps/m68k/printf_fphex.c
@@ -1,2 +1,2 @@
 #define LONG_DOUBLE_DENORM_BIAS IEEE854_LONG_DOUBLE_BIAS
-#include <sysdeps/generic/printf_fphex.c>
+#include <sysdeps/ieee754/ldbl-96/printf_fphex.c>
diff --git a/sysdeps/m68k/strtold.c b/sysdeps/m68k/strtold.c
index dd7fbce195..f756488275 100644
--- a/sysdeps/m68k/strtold.c
+++ b/sysdeps/m68k/strtold.c
@@ -1,2 +1,2 @@
 #define DENORM_EXP (MIN_EXP - 1)
-#include <sysdeps/generic/strtold.c>
+#include <sysdeps/ieee754/ldbl-96/strtold.c>
diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies
index 5aeb9ae460..9f60963329 100644
--- a/sysdeps/mips/Implies
+++ b/sysdeps/mips/Implies
@@ -1,3 +1,4 @@
 wordsize-32
 # MIPS uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/mips/mips64/Implies b/sysdeps/mips/mips64/Implies
index 06b9091f3b..25106df989 100644
--- a/sysdeps/mips/mips64/Implies
+++ b/sysdeps/mips/mips64/Implies
@@ -1,3 +1,4 @@
 wordsize-64
 # MIPS uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/powerpc/Implies b/sysdeps/powerpc/Implies
index d6acf04a82..780c4e2467 100644
--- a/sysdeps/powerpc/Implies
+++ b/sysdeps/powerpc/Implies
@@ -1,2 +1,3 @@
 wordsize-32
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/sparc/Implies b/sysdeps/sparc/Implies
deleted file mode 100644
index da719e1707..0000000000
--- a/sysdeps/sparc/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-# SPARC uses IEEE 754 floating point.
-ieee754
diff --git a/sysdeps/sparc/fpu/bits/mathdef.h b/sysdeps/sparc/fpu/bits/mathdef.h
index c1727b66bb..5294ad4720 100644
--- a/sysdeps/sparc/fpu/bits/mathdef.h
+++ b/sysdeps/sparc/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,8 @@
 # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
 #endif
 
+#include <bits/wordsize.h>
+
 /* FIXME! This file describes properties of the compiler, not the machine;
    it should not be part of libc!  */
 
@@ -74,7 +76,12 @@ typedef double double_t;
 #endif	/* ISO C 9X */
 
 #ifndef __NO_LONG_DOUBLE_MATH
-/* Signal that we do not really have a `long double'.  The disables the
-   declaration of all the `long double' function variants.  */
-# define __NO_LONG_DOUBLE_MATH	1
+
+# if __WORDSIZE == 32
+/* Signal that in 32bit ABI we do not really have a `long double'.
+   The disables the declaration of all the `long double' function
+   variants.  */
+#  define __NO_LONG_DOUBLE_MATH	1
+# endif
+
 #endif
diff --git a/sysdeps/sparc/fpu/bits/mathinline.h b/sysdeps/sparc/fpu/bits/mathinline.h
new file mode 100644
index 0000000000..9017be3544
--- /dev/null
+++ b/sysdeps/sparc/fpu/bits/mathinline.h
@@ -0,0 +1,211 @@
+/* Inline math functions for SPARC.
+   Copyright (C) 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jj@ultra.linux.cz>.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifndef _MATH_H
+# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+#if defined __GNUC__
+
+#ifdef __USE_ISOC9X
+
+#if __WORDSIZE == 32
+
+# define __unordered_cmp(x, y) \
+  (__extension__							      \
+   ({ unsigned __r;							      \
+      if (sizeof(x) == 4 && sizeof(y) == 4)				      \
+	{								      \
+	  float __x = (x); float __y = (y);				      \
+	  __asm__("fcmps %1,%2; st %%fsr, %0" : "=m" (__r) : "f" (__x),	      \
+		  "f" (__y) : "cc");					      \
+	}								      \
+      else								      \
+	{								      \
+	  double __x = (x); double __y = (y);				      \
+	  __asm__("fcmpd\t%1,%2\n\tst\t%%fsr,%0" : "=m" (__r) : "f" (__x),    \
+		  "f" (__y) : "cc");					      \
+	}								      \
+      __r; }))
+
+# define isgreater(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (2 << 10))
+# define isgreaterequal(x, y) ((__unordered_cmp (x, y) & (1 << 10)) == 0)
+# define isless(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (1 << 10))
+# define islessequal(x, y) ((__unordered_cmp (x, y) & (2 << 10)) == 0)
+# define islessgreater(x, y) (((__unordered_cmp (x, y) + (1 << 10)) & (2 << 10)) != 0)
+# define isunordered(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (3 << 10))
+
+#else /* sparc64 */
+
+# define __unordered_v9cmp(x, y, op, qop) \
+  (__extension__							      \
+   ({ unsigned __r;						      	      \
+      if (sizeof(x) == 4 && sizeof(y) == 4)				      \
+	{								      \
+	  float __x = (x); float __y = (y);				      \
+	  __asm__("fcmps\t%%fcc3,%1,%2\n\tmov" ## op ## "\t%%fcc3,1,%0"	      \
+		  : "=r" (__r) : "f" (__x), "f" (__y), "0" (0) : "cc");	      \
+	}								      \
+      else if (sizeof(x) <= 8 && sizeof(y) <= 8)			      \
+	{								      \
+	  double __x = (x); double __y = (y);				      \
+	  __asm__("fcmpd\t%%fcc3,%1,%2\n\tmov" ## op ## "\t%%fcc3,1,%0"	      \
+		  : "=r" (__r) : "f" (__x), "f" (__y), "0" (0) : "cc");	      \
+	}								      \
+      else								      \
+	{								      \
+	  long double __x = (x); long double __y = (y);			      \
+	  extern int _Qp_cmp(const long double *a, const long double *b);     \
+	  __r = qop;						      	      \
+	}								      \
+      __r; }))
+      
+# define isgreater(x, y) __unordered_v9cmp(x, y, "g", _Qp_cmp (&__x, &__y) == 2)
+# define isgreaterequal(x, y) __unordered_v9cmp(x, y, "ge", (_Qp_cmp (&__x, &__y) & 1) == 0)
+# define isless(x, y) __unordered_v9cmp(x, y, "l", _Qp_cmp (&__x, &__y) == 1)
+# define islessequal(x, y) __unordered_v9cmp(x, y, "le", (_Qp_cmp (&__x, &__y) & 2) == 0)
+# define islessgreater(x, y) __unordered_v9cmp(x, y, "lg", ((_Qp_cmp (&__x, &__y) + 1) & 2) != 0)
+# define isunordered(x, y) __unordered_v9cmp(x, y, "u", _Qp_cmp (&__x, &__y) == 3)
+
+#endif /* sparc64 */
+
+#endif /* __USE_ISOC9X */
+
+#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) && defined __OPTIMIZE__
+
+#ifdef __cplusplus
+# define __MATH_INLINE __inline
+#else
+# define __MATH_INLINE extern __inline
+#endif  /* __cplusplus */
+
+/* The gcc, version 2.7 or below, has problems with all this inlining
+   code.  So disable it for this version of the compiler.  */
+
+# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7))
+   /* Test for negative number.  Used in the signbit() macro.  */
+__MATH_INLINE int
+__signbitf (float __x)
+{
+  __extension__ union { float __f; int __i; } __u = { __f: __x };
+  return __u.__i < 0;
+}
+
+__MATH_INLINE int
+__signbit (double __x)
+{
+  __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
+  return __u.__i[0] < 0;
+}
+
+__MATH_INLINE int
+__signbitl (long double __x)
+{
+  if (sizeof(long double) == 8)
+    {
+      __extension__ union { long double __l; int __i[2]; } __u = { __l: __x };
+      return __u.__i[0] < 0;
+    }
+  else
+    {
+      __extension__ union { long double __l; int __i[4]; } __u = { __l: __x };
+      return __u.__i[0] < 0;
+    }
+}
+
+__MATH_INLINE double
+sqrt(double __x)
+{
+  register double __r;
+  __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x));
+  return __r;
+}
+
+__MATH_INLINE float
+sqrtf(float __x)
+{
+  register float __r;
+  __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x));
+  return __r;
+}
+
+#if __WORDSIZE == 64
+__MATH_INLINE long double
+sqrtl(long double __x)
+{
+  long double __r;
+  extern void _Qp_sqrt(long double *, __const__ long double *);
+  _Qp_sqrt(&__r, &__x);
+  return __r;
+}
+#endif /* sparc64 */
+
+/* This code is used internally in the GNU libc.  */
+#ifdef __LIBC_INTERNAL_MATH_INLINES
+__MATH_INLINE double
+__ieee754_sqrt(double __x)
+{
+  register double __r;
+  __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x));
+  return __r;
+}
+
+__MATH_INLINE float
+__ieee754_sqrtf(float __x)
+{
+  register float __r;
+  __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x));
+  return __r;
+}
+
+#if __WORDSIZE == 64
+__MATH_INLINE long double
+__ieee754_sqrtl(long double __x)
+{
+  long double __r;
+  extern void _Qp_sqrt(long double *, __const__ long double *);
+  _Qp_sqrt(&__r, &__x);
+  return __r;
+}
+#endif /* sparc64 */
+#endif /* __LIBC_INTERNAL_MATH_INLINES */
+#endif /* gcc 2.8+ */
+
+#ifdef __USE_ISOC9X
+
+__MATH_INLINE double fdim (double __x, double __y);
+__MATH_INLINE double
+fdim (double __x, double __y)
+{
+  return __x < __y ? 0 : __x - __y;
+}
+
+__MATH_INLINE float fdimf (float __x, float __y);
+__MATH_INLINE float
+fdimf (float __x, float __y)
+{
+  return __x < __y ? 0 : __x - __y;
+}
+
+#endif /* __USE_ISOC9X */
+#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
+#endif /* __GNUC__ */
diff --git a/sysdeps/sparc/sparc32/Implies b/sysdeps/sparc/sparc32/Implies
index 39a34c5f57..ae984a8257 100644
--- a/sysdeps/sparc/sparc32/Implies
+++ b/sysdeps/sparc/sparc32/Implies
@@ -1 +1,4 @@
 wordsize-32
+# SPARC uses IEEE 754 floating point.
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/sparc/bits/wordsize.h b/sysdeps/sparc/sparc32/bits/wordsize.h
index 2ad12e1e7f..2ad12e1e7f 100644
--- a/sysdeps/sparc/bits/wordsize.h
+++ b/sysdeps/sparc/sparc32/bits/wordsize.h
diff --git a/sysdeps/sparc/sparc32/fpu/bits/huge_val.h b/sysdeps/sparc/sparc32/fpu/bits/huge_val.h
new file mode 100644
index 0000000000..673d6f0532
--- /dev/null
+++ b/sysdeps/sparc/sparc32/fpu/bits/huge_val.h
@@ -0,0 +1,100 @@
+/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
+   Used by <stdlib.h> and <math.h> functions for overflow.
+   Copyright (C) 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifndef _MATH_H
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+#endif
+
+#include <features.h>
+#include <bits/wordsize.h>
+
+/* IEEE positive infinity (-HUGE_VAL is negative infinity).  */
+
+#ifdef	__GNUC__
+
+# define HUGE_VAL \
+  (__extension__							      \
+   ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; })   \
+    { __l: 0x7ff0000000000000ULL }).__d)
+
+#else /* not GCC */
+
+typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
+
+# define __HUGE_VAL_bytes	{ 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
+
+static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
+# define HUGE_VAL	(__huge_val.__d)
+
+#endif	/* GCC.  */
+
+
+/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL.  */
+
+#ifdef __USE_ISOC9X
+
+# ifdef __GNUC__
+
+#  define HUGE_VALF \
+  (__extension__							      \
+   ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; })    \
+    { __l: 0x7f800000UL }).__d)
+
+# else /* not GCC */
+
+typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
+
+#  define __HUGE_VALF_bytes	{ 0x7f, 0x80, 0, 0 }
+
+static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
+#  define HUGE_VALF	(__huge_valf.__f)
+
+# endif	/* GCC.  */
+
+#if __WORDSIZE == 32
+
+/* Sparc32 has IEEE 754 64bit long double */
+# define HUGE_VALL HUGE_VAL
+
+#else
+
+/* Sparc64 uses IEEE 754 128bit long double */
+
+#ifdef	__GNUC__
+
+# define HUGE_VALL \
+  (__extension__									\
+   ((union { struct { unsigned long __h, __l; } __i; long double __d; })		\
+    { __i: { __h: 0x7fff000000000000UL, __l: 0 } }).__d)
+              
+#else /* not GCC */
+
+typedef union { unsigned char __c[16]; long double __d; } __huge_vall_t;
+
+# define __HUGE_VALL_bytes	{ 0x7f, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+
+static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
+# define HUGE_VALL	(__huge_vall.__d)
+
+#endif	/* GCC.  */
+
+#endif
+
+#endif /* __USE_ISOC9X.  */
diff --git a/sysdeps/sparc/sparc64/Implies b/sysdeps/sparc/sparc64/Implies
index a8cae95f9d..5b293ba87d 100644
--- a/sysdeps/sparc/sparc64/Implies
+++ b/sysdeps/sparc/sparc64/Implies
@@ -1 +1,5 @@
 wordsize-64
+# SPARC uses IEEE 754 floating point.
+ieee754/flt-32
+ieee754/dbl-64
+ieee754/ldbl-128
diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile
index 656274d75c..312e59ea21 100644
--- a/sysdeps/sparc/sparc64/Makefile
+++ b/sysdeps/sparc/sparc64/Makefile
@@ -1,11 +1,2 @@
-# The Sparc`long double' is a distinct type we support.
-#long-double-fcts = yes
-
-# But the support for ieee quads is so bad we just skip the whole thing.
-# XXX This is only a temporary hack.
-omit-long-double-fcts = yes
-
-# But we do need these few functions to even link stdio proggies
-ifeq ($(subdir),math)
-sysdep_routines += s_isinfl s_isnanl s_finitel s_signbitl
-endif
+# The Sparc `long double' is a distinct type we support.
+long-double-fcts = yes
diff --git a/sysdeps/sparc/sparc64/addmul_1.S b/sysdeps/sparc/sparc64/addmul_1.S
index 6782db77df..db8f53656e 100644
--- a/sysdeps/sparc/sparc64/addmul_1.S
+++ b/sysdeps/sparc/sparc64/addmul_1.S
@@ -1,7 +1,7 @@
 /* SPARC v9 __mpn_addmul_1 -- Multiply a limb vector with a single limb and
    add the product to a second limb vector.
 
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1999 Free Software Foundation, Inc.
 
    This file is part of the GNU MP Library.
 
@@ -31,29 +31,26 @@
 
 
 ENTRY(__mpn_addmul_1)
-	!#PROLOGUE#	0
 	save	%sp,-192,%sp
-	!#PROLOGUE#	1
 
 	sub	%g0,%i2,%o7
-	sllx	%o7,3,%g5
-	sub	%i1,%g5,%o3
-	sub	%i0,%g5,%o4
 	mov	0,%o0			! zero cy_limb
-
+	sllx	%o7,3,%o7
+	sethi	%hi(0x80000000),%o2
 	srl	%i3,0,%o1		! extract low 32 bits of s2_limb
+	sub	%i1,%o7,%o3
 	srlx	%i3,32,%i3		! extract high 32 bits of s2_limb
-	mov	1,%o2
-	sllx	%o2,32,%o2		! o2 = 0x100000000
+	sub	%i0,%o7,%o4
+	add	%o2,%o2,%o2		! o2 = 0x100000000
 
 	!   hi   !
              !  mid-1 !
              !  mid-2 !
 		 !   lo   !
 1:
-	sllx	%o7,3,%g1
-	ldx	[%o3+%g1],%g5
+	ldx	[%o3+%o7],%g5
 	srl	%g5,0,%i0		! zero hi bits
+	ldx	[%o4+%o7],%l1
 	srlx	%g5,32,%g5
 	mulx	%o1,%i0,%i4		! lo product
 	mulx	%i3,%i0,%i1		! mid-1 product
@@ -64,25 +61,24 @@ ENTRY(__mpn_addmul_1)
 	addcc	%i1,%l2,%i1		! add mid products
 	mov	0,%l0			! we need the carry from that add...
 	movcs	%xcc,%o2,%l0		! ...compute it and...
+	sllx	%i1,32,%i0		!  align low bits of mid product
 	add	%i5,%l0,%i5		! ...add to bit 32 of the hi product
-	sllx	%i1,32,%i0		! align low bits of mid product
 	srl	%i4,0,%g5		! zero high 32 bits of lo product
 	add	%i0,%g5,%i0		! combine into low 64 bits of result
 	srlx	%i1,32,%i1		! extract high bits of mid product...
+	addcc	%i0,%o0,%i0		!  add cy_limb to low 64 bits of result
 	add	%i5,%i1,%i1		! ...and add them to the high result
-	addcc	%i0,%o0,%i0		! add cy_limb to low 64 bits of result
 	mov	0,%g5
 	movcs	%xcc,1,%g5
-	add	%o7,1,%o7
-	ldx	[%o4+%g1],%l1
 	addcc	%l1,%i0,%i0
-	movcs	%xcc,1,%g5
-	stx	%i0,[%o4+%g1]
-	brnz	%o7,1b
+	stx	%i0,[%o4+%o7]
+	add	%g5,1,%l1
+	movcs	%xcc,%l1,%g5
+	addcc	%o7,8,%o7
+	bne,pt	%xcc,1b
 	 add	%i1,%g5,%o0		! compute new cy_limb
 
-	mov	%o0,%i0
 	jmpl	%i7+8, %g0
-	 restore
+	 restore %o0,%g0,%o0
 
 END(__mpn_addmul_1)
diff --git a/sysdeps/sparc/sparc64/bits/wordsize.h b/sysdeps/sparc/sparc64/bits/wordsize.h
new file mode 100644
index 0000000000..2ad12e1e7f
--- /dev/null
+++ b/sysdeps/sparc/sparc64/bits/wordsize.h
@@ -0,0 +1,7 @@
+/* Determine the wordsize from the preprocessor defines.  */
+
+#if defined __sparc_v9__ || defined __arch64__ || defined __sparcv9
+# define __WORDSIZE	64
+#else
+# define __WORDSIZE	32
+#endif
diff --git a/sysdeps/sparc/sparc64/fpu/bits/huge_val.h b/sysdeps/sparc/sparc64/fpu/bits/huge_val.h
new file mode 100644
index 0000000000..673d6f0532
--- /dev/null
+++ b/sysdeps/sparc/sparc64/fpu/bits/huge_val.h
@@ -0,0 +1,100 @@
+/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
+   Used by <stdlib.h> and <math.h> functions for overflow.
+   Copyright (C) 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifndef _MATH_H
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+#endif
+
+#include <features.h>
+#include <bits/wordsize.h>
+
+/* IEEE positive infinity (-HUGE_VAL is negative infinity).  */
+
+#ifdef	__GNUC__
+
+# define HUGE_VAL \
+  (__extension__							      \
+   ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; })   \
+    { __l: 0x7ff0000000000000ULL }).__d)
+
+#else /* not GCC */
+
+typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
+
+# define __HUGE_VAL_bytes	{ 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
+
+static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
+# define HUGE_VAL	(__huge_val.__d)
+
+#endif	/* GCC.  */
+
+
+/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL.  */
+
+#ifdef __USE_ISOC9X
+
+# ifdef __GNUC__
+
+#  define HUGE_VALF \
+  (__extension__							      \
+   ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; })    \
+    { __l: 0x7f800000UL }).__d)
+
+# else /* not GCC */
+
+typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
+
+#  define __HUGE_VALF_bytes	{ 0x7f, 0x80, 0, 0 }
+
+static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
+#  define HUGE_VALF	(__huge_valf.__f)
+
+# endif	/* GCC.  */
+
+#if __WORDSIZE == 32
+
+/* Sparc32 has IEEE 754 64bit long double */
+# define HUGE_VALL HUGE_VAL
+
+#else
+
+/* Sparc64 uses IEEE 754 128bit long double */
+
+#ifdef	__GNUC__
+
+# define HUGE_VALL \
+  (__extension__									\
+   ((union { struct { unsigned long __h, __l; } __i; long double __d; })		\
+    { __i: { __h: 0x7fff000000000000UL, __l: 0 } }).__d)
+              
+#else /* not GCC */
+
+typedef union { unsigned char __c[16]; long double __d; } __huge_vall_t;
+
+# define __HUGE_VALL_bytes	{ 0x7f, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+
+static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
+# define HUGE_VALL	(__huge_vall.__d)
+
+#endif	/* GCC.  */
+
+#endif
+
+#endif /* __USE_ISOC9X.  */