+1999-07-12 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * stdio-common/printf_fp.c (__printf_fp): Adjust for IEEE quad
+ as _FPIO_CONST_OFFSET does not cover all bits after binary dot.
+ * sysdeps/generic/printf_fphex.c (__printf_fphex): Support IEEE
+ quad by moving long double support into PRINT_FPHEX_LONG_DOUBLE
+ macro.
+ * sysdeps/alpha/Implies: Imply ieee754/flt-32 and ieee754/dbl-64
+ instead of ieee754.
+ * sysdeps/arm/Implies: Likewise.
+ * sysdeps/i386/Implies: Imply ieee754/flt-32, ieee754/dbl-64, and
+ ieee754/ldbl-96 instead of ieee754.
+ * sysdeps/i386/i686/Implies: Remove implication for libm-i387/i686.
+ * sysdeps/generic/strtold.c: Remove.
+ * sysdeps/generic/e_atanhl.c: New file.
+ * sysdeps/generic/e_coshl.c: New file.
+ * sysdeps/generic/e_sinhl.c: New file.
+ * sysdeps/generic/e_gammal_r.c: New file.
+ * sysdeps/generic/e_hypotl.c: New file.
+ * sysdeps/generic/s_cbrtl.c: New file.
+ * sysdeps/generic/s_asinhl.c: New file.
+ * sysdeps/generic/s_tanhl.c: New file.
+ * sysdeps/generic/w_expl.c: New file.
+ * sysdeps/m68k/Implies: Imply ieee754/flt-32, ieee754/dbl-64, and
+ ieee754/ldbl-96 instead of ieee754.
+ * sysdeps/m68k/strtold.c: Include ldbl-96 version of strtold.
+ * sysdeps/m68k/printf_fphex.c: Include ldbl-96 version of
+ printf_fphex.
+ * sysdeps/mips/Implies: Imply ieee754/flt-32 and ieee754/dbl-64
+ instead of ieee754.
+ * sysdeps/mips/mips64/Implies: Likewise.
+ * sysdeps/powerpc/Implies: Likewise.
+ * sysdeps/sparc/Implies: Remove.
+ * sysdeps/sparc/sparc32/Implies: Imply ieee754/flt-32 and
+ ieee754/dbl-64.
+ * sysdeps/sparc/sparc64/Implies: Imply ieee754/flt-32, ieee754/dbl-64,
+ and ieee754/ldbl-128.
+
+ * sysdeps/sparc/bits/wordsize.h: Remove.
+ * sysdeps/sparc/fpu/bits/mathinline.h: New file.
+ * sysdeps/sparc/fpu/bits/mathdef.h: __NO_LONG_DOUBLE_MATH
+ only for sparc32.
+ * sysdeps/sparc/sparc32/fpu/bits/huge_val.h: New file.
+ * sysdeps/sparc/sparc32/bits/wordsize.h: New file.
+ * sysdeps/sparc/sparc64/fpu/bits/huge_val.h: New file.
+ * sysdeps/sparc/sparc64/bits/wordsize.h: New file.
+ * sysdeps/sparc/sparc64/Makefile: Add IEEE quad long double
+ support.
+
+ * sysdeps/sparc/sparc64/addmul_1.S: Fix miscalculation
+ of carries. Optimize.
+
+ * sysdeps/libm-ieee754/e_exp10.c: Moved to ...
+ * math/e_exp10.c: ...here.
+ * sysdeps/libm-ieee754/e_exp10f.c: Moved to ...
+ * math/e_exp10f.c: ...here.
+ * sysdeps/libm-ieee754/e_exp10l.c: Moved to ...
+ * math/e_exp10l.c: ...here.
+ * sysdeps/libm-ieee754/e_scalb.c: Moved to ...
+ * math/e_scalb.c: ...here.
+ * sysdeps/libm-ieee754/e_scalbf.c: Moved to ...
+ * math/e_scalbf.c: ...here.
+ * sysdeps/libm-ieee754/e_scalbl.c: Moved to ...
+ * math/e_scalbl.c: ...here.
+ * sysdeps/libm-ieee754/s_cacos.c: Moved to ...
+ * math/s_cacos.c: ...here.
+ * sysdeps/libm-ieee754/s_cacosf.c: Moved to ...
+ * math/s_cacosf.c: ...here.
+ * sysdeps/libm-ieee754/s_cacosh.c: Moved to ...
+ * math/s_cacosh.c: ...here.
+ * sysdeps/libm-ieee754/s_cacoshf.c: Moved to ...
+ * math/s_cacoshf.c: ...here.
+ * sysdeps/libm-ieee754/s_cacoshl.c: Moved to ...
+ * math/s_cacoshl.c: ...here.
+ * sysdeps/libm-ieee754/s_cacosl.c: Moved to ...
+ * math/s_cacosl.c: ...here.
+ * sysdeps/libm-ieee754/s_casin.c: Moved to ...
+ * math/s_casin.c: ...here.
+ * sysdeps/libm-ieee754/s_casinf.c: Moved to ...
+ * math/s_casinf.c: ...here.
+ * sysdeps/libm-ieee754/s_casinh.c: Moved to ...
+ * math/s_casinh.c: ...here.
+ * sysdeps/libm-ieee754/s_casinhf.c: Moved to ...
+ * math/s_casinhf.c: ...here.
+ * sysdeps/libm-ieee754/s_casinhl.c: Moved to ...
+ * math/s_casinhl.c: ...here.
+ * sysdeps/libm-ieee754/s_casinl.c: Moved to ...
+ * math/s_casinl.c: ...here.
+ * sysdeps/libm-ieee754/s_catan.c: Moved to ...
+ * math/s_catan.c: ...here.
+ * sysdeps/libm-ieee754/s_catanf.c: Moved to ...
+ * math/s_catanf.c: ...here.
+ * sysdeps/libm-ieee754/s_catanh.c: Moved to ...
+ * math/s_catanh.c: ...here.
+ * sysdeps/libm-ieee754/s_catanhf.c: Moved to ...
+ * math/s_catanhf.c: ...here.
+ * sysdeps/libm-ieee754/s_catanhl.c: Moved to ...
+ * math/s_catanhl.c: ...here.
+ * sysdeps/libm-ieee754/s_catanl.c: Moved to ...
+ * math/s_catanl.c: ...here.
+ * sysdeps/libm-ieee754/s_ccos.c: Moved to ...
+ * math/s_ccos.c: ...here.
+ * sysdeps/libm-ieee754/s_ccosf.c: Moved to ...
+ * math/s_ccosf.c: ...here.
+ * sysdeps/libm-ieee754/s_ccosh.c: Moved to ...
+ * math/s_ccosh.c: ...here.
+ * sysdeps/libm-ieee754/s_ccoshf.c: Moved to ...
+ * math/s_ccoshf.c: ...here.
+ * sysdeps/libm-ieee754/s_ccoshl.c: Moved to ...
+ * math/s_ccoshl.c: ...here.
+ * sysdeps/libm-ieee754/s_ccosl.c: Moved to ...
+ * math/s_ccosl.c: ...here.
+ * sysdeps/libm-ieee754/s_cexp.c: Moved to ...
+ * math/s_cexp.c: ...here.
+ * sysdeps/libm-ieee754/s_cexpf.c: Moved to ...
+ * math/s_cexpf.c: ...here.
+ * sysdeps/libm-ieee754/s_cexpl.c: Moved to ...
+ * math/s_cexpl.c: ...here.
+ * sysdeps/libm-ieee754/s_clog.c: Moved to ...
+ * math/s_clog.c: ...here.
+ * sysdeps/libm-ieee754/s_clog10.c: Moved to ...
+ * math/s_clog10.c: ...here.
+ * sysdeps/libm-ieee754/s_clog10f.c: Moved to ...
+ * math/s_clog10f.c: ...here.
+ * sysdeps/libm-ieee754/s_clog10l.c: Moved to ...
+ * math/s_clog10l.c: ...here.
+ * sysdeps/libm-ieee754/s_clogf.c: Moved to ...
+ * math/s_clogf.c: ...here.
+ * sysdeps/libm-ieee754/s_clogl.c: Moved to ...
+ * math/s_clogl.c: ...here.
+ * sysdeps/libm-ieee754/s_cpow.c: Moved to ...
+ * math/s_cpow.c: ...here.
+ * sysdeps/libm-ieee754/s_cpowf.c: Moved to ...
+ * math/s_cpowf.c: ...here.
+ * sysdeps/libm-ieee754/s_cpowl.c: Moved to ...
+ * math/s_cpowl.c: ...here.
+ * sysdeps/libm-ieee754/s_cproj.c: Moved to ...
+ * math/s_cproj.c: ...here.
+ * sysdeps/libm-ieee754/s_cprojf.c: Moved to ...
+ * math/s_cprojf.c: ...here.
+ * sysdeps/libm-ieee754/s_cprojl.c: Moved to ...
+ * math/s_cprojl.c: ...here.
+ * sysdeps/libm-ieee754/s_csin.c: Moved to ...
+ * math/s_csin.c: ...here.
+ * sysdeps/libm-ieee754/s_csinf.c: Moved to ...
+ * math/s_csinf.c: ...here.
+ * sysdeps/libm-ieee754/s_csinh.c: Moved to ...
+ * math/s_csinh.c: ...here.
+ * sysdeps/libm-ieee754/s_csinhf.c: Moved to ...
+ * math/s_csinhf.c: ...here.
+ * sysdeps/libm-ieee754/s_csinhl.c: Moved to ...
+ * math/s_csinhl.c: ...here.
+ * sysdeps/libm-ieee754/s_csinl.c: Moved to ...
+ * math/s_csinl.c: ...here.
+ * sysdeps/libm-ieee754/s_csqrt.c: Moved to ...
+ * math/s_csqrt.c: ...here.
+ * sysdeps/libm-ieee754/s_csqrtf.c: Moved to ...
+ * math/s_csqrtf.c: ...here.
+ * sysdeps/libm-ieee754/s_csqrtl.c: Moved to ...
+ * math/s_csqrtl.c: ...here.
+ * sysdeps/libm-ieee754/s_ctan.c: Moved to ...
+ * math/s_ctan.c: ...here.
+ * sysdeps/libm-ieee754/s_ctanf.c: Moved to ...
+ * math/s_ctanf.c: ...here.
+ * sysdeps/libm-ieee754/s_ctanh.c: Moved to ...
+ * math/s_ctanh.c: ...here.
+ * sysdeps/libm-ieee754/s_ctanhf.c: Moved to ...
+ * math/s_ctanhf.c: ...here.
+ * sysdeps/libm-ieee754/s_ctanhl.c: Moved to ...
+ * math/s_ctanhl.c: ...here.
+ * sysdeps/libm-ieee754/s_ctanl.c: Moved to ...
+ * math/s_ctanl.c: ...here.
+ * sysdeps/libm-ieee754/s_fdim.c: Moved to ...
+ * math/s_fdim.c: ...here.
+ * sysdeps/libm-ieee754/s_fdimf.c: Moved to ...
+ * math/s_fdimf.c: ...here.
+ * sysdeps/libm-ieee754/s_fdiml.c: Moved to ...
+ * math/s_fdiml.c: ...here.
+ * sysdeps/libm-ieee754/s_fma.c: Moved to ...
+ * math/s_fma.c: ...here.
+ * sysdeps/libm-ieee754/s_fmaf.c: Moved to ...
+ * math/s_fmaf.c: ...here.
+ * sysdeps/libm-ieee754/s_fmal.c: Moved to ...
+ * math/s_fmal.c: ...here.
+ * sysdeps/libm-ieee754/s_fmax.c: Moved to ...
+ * math/s_fmax.c: ...here.
+ * sysdeps/libm-ieee754/s_fmaxf.c: Moved to ...
+ * math/s_fmaxf.c: ...here.
+ * sysdeps/libm-ieee754/s_fmaxl.c: Moved to ...
+ * math/s_fmaxl.c: ...here.
+ * sysdeps/libm-ieee754/s_fmin.c: Moved to ...
+ * math/s_fmin.c: ...here.
+ * sysdeps/libm-ieee754/s_fminf.c: Moved to ...
+ * math/s_fminf.c: ...here.
+ * sysdeps/libm-ieee754/s_fminl.c: Moved to ...
+ * math/s_fminl.c: ...here.
+ * sysdeps/libm-ieee754/s_ldexp.c: Moved to ...
+ * math/s_ldexp.c: ...here.
+ * sysdeps/libm-ieee754/s_ldexpf.c: Moved to ...
+ * math/s_ldexpf.c: ...here.
+ * sysdeps/libm-ieee754/s_ldexpl.c: Moved to ...
+ * math/s_ldexpl.c: ...here.
+ * sysdeps/libm-ieee754/s_nan.c: Moved to ...
+ * math/s_nan.c: ...here.
+ * sysdeps/libm-ieee754/s_nanf.c: Moved to ...
+ * math/s_nanf.c: ...here.
+ * sysdeps/libm-ieee754/s_nanl.c: Moved to ...
+ * math/s_nanl.c: ...here.
+ * sysdeps/libm-ieee754/s_significand.c: Moved to ...
+ * math/s_significand.c: ...here.
+ * sysdeps/libm-ieee754/s_significandf.c: Moved to ...
+ * math/s_significandf.c: ...here.
+ * sysdeps/libm-ieee754/s_significandl.c: Moved to ...
+ * math/s_significandl.c: ...here.
+ Avoid conversion from int to double and then to long double.
+ * sysdeps/libm-ieee754/w_acos.c: Moved to ...
+ * math/w_acos.c: ...here.
+ * sysdeps/libm-ieee754/w_acosf.c: Moved to ...
+ * math/w_acosf.c: ...here.
+ * sysdeps/libm-ieee754/w_acosh.c: Moved to ...
+ * math/w_acosh.c: ...here.
+ * sysdeps/libm-ieee754/w_acoshf.c: Moved to ...
+ * math/w_acoshf.c: ...here.
+ * sysdeps/libm-ieee754/w_acoshl.c: Moved to ...
+ * math/w_acoshl.c: ...here.
+ * sysdeps/libm-ieee754/w_acosl.c: Moved to ...
+ * math/w_acosl.c: ...here.
+ * sysdeps/libm-ieee754/w_asin.c: Moved to ...
+ * math/w_asin.c: ...here.
+ * sysdeps/libm-ieee754/w_asinf.c: Moved to ...
+ * math/w_asinf.c: ...here.
+ * sysdeps/libm-ieee754/w_asinl.c: Moved to ...
+ * math/w_asinl.c: ...here.
+ * sysdeps/libm-ieee754/w_atan2.c: Moved to ...
+ * math/w_atan2.c: ...here.
+ * sysdeps/libm-ieee754/w_atan2f.c: Moved to ...
+ * math/w_atan2f.c: ...here.
+ * sysdeps/libm-ieee754/w_atan2l.c: Moved to ...
+ * math/w_atan2l.c: ...here.
+ * sysdeps/libm-ieee754/w_atanh.c: Moved to ...
+ * math/w_atanh.c: ...here.
+ * sysdeps/libm-ieee754/w_atanhf.c: Moved to ...
+ * math/w_atanhf.c: ...here.
+ * sysdeps/libm-ieee754/w_atanhl.c: Moved to ...
+ * math/w_atanhl.c: ...here.
+ * sysdeps/libm-ieee754/w_cosh.c: Moved to ...
+ * math/w_cosh.c: ...here.
+ * sysdeps/libm-ieee754/w_coshf.c: Moved to ...
+ * math/w_coshf.c: ...here.
+ * sysdeps/libm-ieee754/w_coshl.c: Moved to ...
+ * math/w_coshl.c: ...here.
+ * sysdeps/libm-ieee754/w_drem.c: Moved to ...
+ * math/w_drem.c: ...here.
+ * sysdeps/libm-ieee754/w_dremf.c: Moved to ...
+ * math/w_dremf.c: ...here.
+ * sysdeps/libm-ieee754/w_dreml.c: Moved to ...
+ * math/w_dreml.c: ...here.
+ * sysdeps/libm-ieee754/w_exp10.c: Moved to ...
+ * math/w_exp10.c: ...here.
+ * sysdeps/libm-ieee754/w_exp10f.c: Moved to ...
+ * math/w_exp10f.c: ...here.
+ * sysdeps/libm-ieee754/w_exp10l.c: Moved to ...
+ * math/w_exp10l.c: ...here.
+ * sysdeps/libm-ieee754/w_exp2.c: Moved to ...
+ * math/w_exp2.c: ...here.
+ * sysdeps/libm-ieee754/w_exp2f.c: Moved to ...
+ * math/w_exp2f.c: ...here.
+ * sysdeps/libm-ieee754/w_exp2l.c: Moved to ...
+ * math/w_exp2l.c: ...here.
+ * sysdeps/libm-ieee754/w_fmod.c: Moved to ...
+ * math/w_fmod.c: ...here.
+ * sysdeps/libm-ieee754/w_fmodf.c: Moved to ...
+ * math/w_fmodf.c: ...here.
+ * sysdeps/libm-ieee754/w_fmodl.c: Moved to ...
+ * math/w_fmodl.c: ...here.
+ * sysdeps/libm-ieee754/w_hypot.c: Moved to ...
+ * math/w_hypot.c: ...here.
+ * sysdeps/libm-ieee754/w_hypotf.c: Moved to ...
+ * math/w_hypotf.c: ...here.
+ * sysdeps/libm-ieee754/w_hypotl.c: Moved to ...
+ * math/w_hypotl.c: ...here.
+ * sysdeps/libm-ieee754/w_j0.c: Moved to ...
+ * math/w_j0.c: ...here.
+ * sysdeps/libm-ieee754/w_j0f.c: Moved to ...
+ * math/w_j0f.c: ...here.
+ * sysdeps/libm-ieee754/w_j0l.c: Moved to ...
+ * math/w_j0l.c: ...here.
+ * sysdeps/libm-ieee754/w_j1.c: Moved to ...
+ * math/w_j1.c: ...here.
+ * sysdeps/libm-ieee754/w_j1f.c: Moved to ...
+ * math/w_j1f.c: ...here.
+ * sysdeps/libm-ieee754/w_j1l.c: Moved to ...
+ * math/w_j1l.c: ...here.
+ * sysdeps/libm-ieee754/w_jn.c: Moved to ...
+ * math/w_jn.c: ...here.
+ * sysdeps/libm-ieee754/w_jnf.c: Moved to ...
+ * math/w_jnf.c: ...here.
+ * sysdeps/libm-ieee754/w_jnl.c: Moved to ...
+ * math/w_jnl.c: ...here.
+ * sysdeps/libm-ieee754/w_lgamma.c: Moved to ...
+ * math/w_lgamma.c: ...here.
+ * sysdeps/libm-ieee754/w_lgamma_r.c: Moved to ...
+ * math/w_lgamma_r.c: ...here.
+ * sysdeps/libm-ieee754/w_lgammaf.c: Moved to ...
+ * math/w_lgammaf.c: ...here.
+ * sysdeps/libm-ieee754/w_lgammaf_r.c: Moved to ...
+ * math/w_lgammaf_r.c: ...here.
+ * sysdeps/libm-ieee754/w_lgammal.c: Moved to ...
+ * math/w_lgammal.c: ...here.
+ * sysdeps/libm-ieee754/w_lgammal_r.c: Moved to ...
+ * math/w_lgammal_r.c: ...here.
+ * sysdeps/libm-ieee754/w_log.c: Moved to ...
+ * math/w_log.c: ...here.
+ * sysdeps/libm-ieee754/w_log10.c: Moved to ...
+ * math/w_log10.c: ...here.
+ * sysdeps/libm-ieee754/w_log10f.c: Moved to ...
+ * math/w_log10f.c: ...here.
+ * sysdeps/libm-ieee754/w_log10l.c: Moved to ...
+ * math/w_log10l.c: ...here.
+ * sysdeps/libm-ieee754/w_logf.c: Moved to ...
+ * math/w_logf.c: ...here.
+ * sysdeps/libm-ieee754/w_logl.c: Moved to ...
+ * math/w_logl.c: ...here.
+ * sysdeps/libm-ieee754/w_pow.c: Moved to ...
+ * math/w_pow.c: ...here.
+ * sysdeps/libm-ieee754/w_powf.c: Moved to ...
+ * math/w_powf.c: ...here.
+ * sysdeps/libm-ieee754/w_powl.c: Moved to ...
+ * math/w_powl.c: ...here.
+ * sysdeps/libm-ieee754/w_remainder.c: Moved to ...
+ * math/w_remainder.c: ...here.
+ * sysdeps/libm-ieee754/w_remainderf.c: Moved to ...
+ * math/w_remainderf.c: ...here.
+ * sysdeps/libm-ieee754/w_remainderl.c: Moved to ...
+ * math/w_remainderl.c: ...here.
+ * sysdeps/libm-ieee754/w_scalb.c: Moved to ...
+ * math/w_scalb.c: ...here.
+ * sysdeps/libm-ieee754/w_scalbf.c: Moved to ...
+ * math/w_scalbf.c: ...here.
+ * sysdeps/libm-ieee754/w_scalbl.c: Moved to ...
+ * math/w_scalbl.c: ...here.
+ * sysdeps/libm-ieee754/w_sinh.c: Moved to ...
+ * math/w_sinh.c: ...here.
+ * sysdeps/libm-ieee754/w_sinhf.c: Moved to ...
+ * math/w_sinhf.c: ...here.
+ * sysdeps/libm-ieee754/w_sinhl.c: Moved to ...
+ * math/w_sinhl.c: ...here.
+ * sysdeps/libm-ieee754/w_sqrt.c: Moved to ...
+ * math/w_sqrt.c: ...here.
+ * sysdeps/libm-ieee754/w_sqrtf.c: Moved to ...
+ * math/w_sqrtf.c: ...here.
+ * sysdeps/libm-ieee754/w_sqrtl.c: Moved to ...
+ * math/w_sqrtl.c: ...here.
+ * sysdeps/libm-ieee754/w_tgamma.c: Moved to ...
+ * math/w_tgamma.c: ...here.
+ * sysdeps/libm-ieee754/w_tgammaf.c: Moved to ...
+ * math/w_tgammaf.c: ...here.
+ * sysdeps/libm-ieee754/w_tgammal.c: Moved to ...
+ * math/w_tgammal.c: ...here.
+ * sysdeps/libm-i387/e_acos.S: Moved to ...
+ * sysdeps/i386/fpu/e_acos.S: ...here.
+ * sysdeps/libm-i387/e_acosf.S: Moved to ...
+ * sysdeps/i386/fpu/e_acosf.S: ...here.
+ * sysdeps/libm-i387/e_acosh.S: Moved to ...
+ * sysdeps/i386/fpu/e_acosh.S: ...here.
+ * sysdeps/libm-i387/e_acoshf.S: Moved to ...
+ * sysdeps/i386/fpu/e_acoshf.S: ...here.
+ * sysdeps/libm-i387/e_acoshl.S: Moved to ...
+ * sysdeps/i386/fpu/e_acoshl.S: ...here.
+ * sysdeps/libm-i387/e_acosl.S: Moved to ...
+ * sysdeps/i386/fpu/e_acosl.S: ...here.
+ * sysdeps/libm-i387/e_asin.S: Moved to ...
+ * sysdeps/i386/fpu/e_asin.S: ...here.
+ * sysdeps/libm-i387/e_asinf.S: Moved to ...
+ * sysdeps/i386/fpu/e_asinf.S: ...here.
+ * sysdeps/libm-i387/e_asinl.S: Moved to ...
+ * sysdeps/i386/fpu/e_asinl.S: ...here.
+ * sysdeps/libm-i387/e_atan2.S: Moved to ...
+ * sysdeps/i386/fpu/e_atan2.S: ...here.
+ * sysdeps/libm-i387/e_atan2f.S: Moved to ...
+ * sysdeps/i386/fpu/e_atan2f.S: ...here.
+ * sysdeps/libm-i387/e_atan2l.S: Moved to ...
+ * sysdeps/i386/fpu/e_atan2l.S: ...here.
+ * sysdeps/libm-i387/e_atanh.S: Moved to ...
+ * sysdeps/i386/fpu/e_atanh.S: ...here.
+ * sysdeps/libm-i387/e_atanhf.S: Moved to ...
+ * sysdeps/i386/fpu/e_atanhf.S: ...here.
+ * sysdeps/libm-i387/e_atanhl.S: Moved to ...
+ * sysdeps/i386/fpu/e_atanhl.S: ...here.
+ * sysdeps/libm-i387/e_exp.S: Moved to ...
+ * sysdeps/i386/fpu/e_exp.S: ...here.
+ * sysdeps/libm-i387/e_exp10.S: Moved to ...
+ * sysdeps/i386/fpu/e_exp10.S: ...here.
+ * sysdeps/libm-i387/e_exp10f.S: Moved to ...
+ * sysdeps/i386/fpu/e_exp10f.S: ...here.
+ * sysdeps/libm-i387/e_exp10l.S: Moved to ...
+ * sysdeps/i386/fpu/e_exp10l.S: ...here.
+ * sysdeps/libm-i387/e_expf.S: Moved to ...
+ * sysdeps/i386/fpu/e_expf.S: ...here.
+ * sysdeps/libm-i387/e_expl.S: Moved to ...
+ * sysdeps/i386/fpu/e_expl.S: ...here.
+ * sysdeps/libm-i387/e_fmod.S: Moved to ...
+ * sysdeps/i386/fpu/e_fmod.S: ...here.
+ * sysdeps/libm-i387/e_fmodf.S: Moved to ...
+ * sysdeps/i386/fpu/e_fmodf.S: ...here.
+ * sysdeps/libm-i387/e_fmodl.S: Moved to ...
+ * sysdeps/i386/fpu/e_fmodl.S: ...here.
+ * sysdeps/libm-i387/e_hypot.S: Moved to ...
+ * sysdeps/i386/fpu/e_hypot.S: ...here.
+ * sysdeps/libm-i387/e_hypotf.S: Moved to ...
+ * sysdeps/i386/fpu/e_hypotf.S: ...here.
+ * sysdeps/libm-i387/e_log.S: Moved to ...
+ * sysdeps/i386/fpu/e_log.S: ...here.
+ * sysdeps/libm-i387/e_log10.S: Moved to ...
+ * sysdeps/i386/fpu/e_log10.S: ...here.
+ * sysdeps/libm-i387/e_log10f.S: Moved to ...
+ * sysdeps/i386/fpu/e_log10f.S: ...here.
+ * sysdeps/libm-i387/e_log10l.S: Moved to ...
+ * sysdeps/i386/fpu/e_log10l.S: ...here.
+ * sysdeps/libm-i387/e_logf.S: Moved to ...
+ * sysdeps/i386/fpu/e_logf.S: ...here.
+ * sysdeps/libm-i387/e_logl.S: Moved to ...
+ * sysdeps/i386/fpu/e_logl.S: ...here.
+ * sysdeps/libm-i387/e_pow.S: Moved to ...
+ * sysdeps/i386/fpu/e_pow.S: ...here.
+ * sysdeps/libm-i387/e_powf.S: Moved to ...
+ * sysdeps/i386/fpu/e_powf.S: ...here.
+ * sysdeps/libm-i387/e_powl.S: Moved to ...
+ * sysdeps/i386/fpu/e_powl.S: ...here.
+ * sysdeps/libm-i387/e_rem_pio2l.c: Moved to ...
+ * sysdeps/i386/fpu/e_rem_pio2l.c: ...here.
+ * sysdeps/libm-i387/e_remainder.S: Moved to ...
+ * sysdeps/i386/fpu/e_remainder.S: ...here.
+ * sysdeps/libm-i387/e_remainderf.S: Moved to ...
+ * sysdeps/i386/fpu/e_remainderf.S: ...here.
+ * sysdeps/libm-i387/e_remainderl.S: Moved to ...
+ * sysdeps/i386/fpu/e_remainderl.S: ...here.
+ * sysdeps/libm-i387/e_scalb.S: Moved to ...
+ * sysdeps/i386/fpu/e_scalb.S: ...here.
+ * sysdeps/libm-i387/e_scalbf.S: Moved to ...
+ * sysdeps/i386/fpu/e_scalbf.S: ...here.
+ * sysdeps/libm-i387/e_scalbl.S: Moved to ...
+ * sysdeps/i386/fpu/e_scalbl.S: ...here.
+ * sysdeps/libm-i387/e_sqrt.S: Moved to ...
+ * sysdeps/i386/fpu/e_sqrt.S: ...here.
+ * sysdeps/libm-i387/e_sqrtf.S: Moved to ...
+ * sysdeps/i386/fpu/e_sqrtf.S: ...here.
+ * sysdeps/libm-i387/e_sqrtl.S: Moved to ...
+ * sysdeps/i386/fpu/e_sqrtl.S: ...here.
+ * sysdeps/libm-i387/k_rem_pio2l.c: Moved to ...
+ * sysdeps/i386/fpu/k_rem_pio2l.c: ...here.
+ * sysdeps/libm-i387/s_asinh.S: Moved to ...
+ * sysdeps/i386/fpu/s_asinh.S: ...here.
+ * sysdeps/libm-i387/s_asinhf.S: Moved to ...
+ * sysdeps/i386/fpu/s_asinhf.S: ...here.
+ * sysdeps/libm-i387/s_asinhl.S: Moved to ...
+ * sysdeps/i386/fpu/s_asinhl.S: ...here.
+ * sysdeps/libm-i387/s_atan.S: Moved to ...
+ * sysdeps/i386/fpu/s_atan.S: ...here.
+ * sysdeps/libm-i387/s_atanf.S: Moved to ...
+ * sysdeps/i386/fpu/s_atanf.S: ...here.
+ * sysdeps/libm-i387/s_atanl.S: Moved to ...
+ * sysdeps/i386/fpu/s_atanl.S: ...here.
+ * sysdeps/libm-i387/s_cbrt.S: Moved to ...
+ * sysdeps/i386/fpu/s_cbrt.S: ...here.
+ * sysdeps/libm-i387/s_cbrtf.S: Moved to ...
+ * sysdeps/i386/fpu/s_cbrtf.S: ...here.
+ * sysdeps/libm-i387/s_cbrtl.S: Moved to ...
+ * sysdeps/i386/fpu/s_cbrtl.S: ...here.
+ * sysdeps/libm-i387/s_ceil.S: Moved to ...
+ * sysdeps/i386/fpu/s_ceil.S: ...here.
+ * sysdeps/libm-i387/s_ceilf.S: Moved to ...
+ * sysdeps/i386/fpu/s_ceilf.S: ...here.
+ * sysdeps/libm-i387/s_ceill.S: Moved to ...
+ * sysdeps/i386/fpu/s_ceill.S: ...here.
+ * sysdeps/libm-i387/s_cexp.S: Moved to ...
+ * sysdeps/i386/fpu/s_cexp.S: ...here.
+ * sysdeps/libm-i387/s_cexpf.S: Moved to ...
+ * sysdeps/i386/fpu/s_cexpf.S: ...here.
+ * sysdeps/libm-i387/s_cexpl.S: Moved to ...
+ * sysdeps/i386/fpu/s_cexpl.S: ...here.
+ * sysdeps/libm-i387/s_copysign.S: Moved to ...
+ * sysdeps/i386/fpu/s_copysign.S: ...here.
+ * sysdeps/libm-i387/s_copysignf.S: Moved to ...
+ * sysdeps/i386/fpu/s_copysignf.S: ...here.
+ * sysdeps/libm-i387/s_copysignl.S: Moved to ...
+ * sysdeps/i386/fpu/s_copysignl.S: ...here.
+ * sysdeps/libm-i387/s_cos.S: Moved to ...
+ * sysdeps/i386/fpu/s_cos.S: ...here.
+ * sysdeps/libm-i387/s_cosf.S: Moved to ...
+ * sysdeps/i386/fpu/s_cosf.S: ...here.
+ * sysdeps/libm-i387/s_cosl.S: Moved to ...
+ * sysdeps/i386/fpu/s_cosl.S: ...here.
+ * sysdeps/libm-i387/s_exp2.S: Moved to ...
+ * sysdeps/i386/fpu/s_exp2.S: ...here.
+ * sysdeps/libm-i387/s_exp2f.S: Moved to ...
+ * sysdeps/i386/fpu/s_exp2f.S: ...here.
+ * sysdeps/libm-i387/s_exp2l.S: Moved to ...
+ * sysdeps/i386/fpu/s_exp2l.S: ...here.
+ * sysdeps/libm-i387/s_expm1.S: Moved to ...
+ * sysdeps/i386/fpu/s_expm1.S: ...here.
+ * sysdeps/libm-i387/s_expm1f.S: Moved to ...
+ * sysdeps/i386/fpu/s_expm1f.S: ...here.
+ * sysdeps/libm-i387/s_expm1l.S: Moved to ...
+ * sysdeps/i386/fpu/s_expm1l.S: ...here.
+ * sysdeps/libm-i387/s_fdim.S: Moved to ...
+ * sysdeps/i386/fpu/s_fdim.S: ...here.
+ * sysdeps/libm-i387/s_fdimf.S: Moved to ...
+ * sysdeps/i386/fpu/s_fdimf.S: ...here.
+ * sysdeps/libm-i387/s_fdiml.S: Moved to ...
+ * sysdeps/i386/fpu/s_fdiml.S: ...here.
+ * sysdeps/libm-i387/s_finite.S: Moved to ...
+ * sysdeps/i386/fpu/s_finite.S: ...here.
+ * sysdeps/libm-i387/s_finitef.S: Moved to ...
+ * sysdeps/i386/fpu/s_finitef.S: ...here.
+ * sysdeps/libm-i387/s_finitel.S: Moved to ...
+ * sysdeps/i386/fpu/s_finitel.S: ...here.
+ * sysdeps/libm-i387/s_floor.S: Moved to ...
+ * sysdeps/i386/fpu/s_floor.S: ...here.
+ * sysdeps/libm-i387/s_floorf.S: Moved to ...
+ * sysdeps/i386/fpu/s_floorf.S: ...here.
+ * sysdeps/libm-i387/s_floorl.S: Moved to ...
+ * sysdeps/i386/fpu/s_floorl.S: ...here.
+ * sysdeps/libm-i387/s_fma.S: Moved to ...
+ * sysdeps/i386/fpu/s_fma.S: ...here.
+ * sysdeps/libm-i387/s_fmaf.S: Moved to ...
+ * sysdeps/i386/fpu/s_fmaf.S: ...here.
+ * sysdeps/libm-i387/s_fmal.S: Moved to ...
+ * sysdeps/i386/fpu/s_fmal.S: ...here.
+ * sysdeps/libm-i387/s_fmax.S: Moved to ...
+ * sysdeps/i386/fpu/s_fmax.S: ...here.
+ * sysdeps/libm-i387/s_fmaxf.S: Moved to ...
+ * sysdeps/i386/fpu/s_fmaxf.S: ...here.
+ * sysdeps/libm-i387/s_fmaxl.S: Moved to ...
+ * sysdeps/i386/fpu/s_fmaxl.S: ...here.
+ * sysdeps/libm-i387/s_fmin.S: Moved to ...
+ * sysdeps/i386/fpu/s_fmin.S: ...here.
+ * sysdeps/libm-i387/s_fminf.S: Moved to ...
+ * sysdeps/i386/fpu/s_fminf.S: ...here.
+ * sysdeps/libm-i387/s_fminl.S: Moved to ...
+ * sysdeps/i386/fpu/s_fminl.S: ...here.
+ * sysdeps/libm-i387/s_frexp.S: Moved to ...
+ * sysdeps/i386/fpu/s_frexp.S: ...here.
+ * sysdeps/libm-i387/s_frexpf.S: Moved to ...
+ * sysdeps/i386/fpu/s_frexpf.S: ...here.
+ * sysdeps/libm-i387/s_frexpl.S: Moved to ...
+ * sysdeps/i386/fpu/s_frexpl.S: ...here.
+ * sysdeps/libm-i387/s_ilogb.S: Moved to ...
+ * sysdeps/i386/fpu/s_ilogb.S: ...here.
+ * sysdeps/libm-i387/s_ilogbf.S: Moved to ...
+ * sysdeps/i386/fpu/s_ilogbf.S: ...here.
+ * sysdeps/libm-i387/s_ilogbl.S: Moved to ...
+ * sysdeps/i386/fpu/s_ilogbl.S: ...here.
+ * sysdeps/libm-i387/s_llrint.S: Moved to ...
+ * sysdeps/i386/fpu/s_llrint.S: ...here.
+ * sysdeps/libm-i387/s_llrintf.S: Moved to ...
+ * sysdeps/i386/fpu/s_llrintf.S: ...here.
+ * sysdeps/libm-i387/s_llrintl.S: Moved to ...
+ * sysdeps/i386/fpu/s_llrintl.S: ...here.
+ * sysdeps/libm-i387/s_log1p.S: Moved to ...
+ * sysdeps/i386/fpu/s_log1p.S: ...here.
+ * sysdeps/libm-i387/s_log1pf.S: Moved to ...
+ * sysdeps/i386/fpu/s_log1pf.S: ...here.
+ * sysdeps/libm-i387/s_log1pl.S: Moved to ...
+ * sysdeps/i386/fpu/s_log1pl.S: ...here.
+ * sysdeps/libm-i387/s_log2.S: Moved to ...
+ * sysdeps/i386/fpu/s_log2.S: ...here.
+ * sysdeps/libm-i387/s_log2f.S: Moved to ...
+ * sysdeps/i386/fpu/s_log2f.S: ...here.
+ * sysdeps/libm-i387/s_log2l.S: Moved to ...
+ * sysdeps/i386/fpu/s_log2l.S: ...here.
+ * sysdeps/libm-i387/s_logb.S: Moved to ...
+ * sysdeps/i386/fpu/s_logb.S: ...here.
+ * sysdeps/libm-i387/s_logbf.S: Moved to ...
+ * sysdeps/i386/fpu/s_logbf.S: ...here.
+ * sysdeps/libm-i387/s_logbl.S: Moved to ...
+ * sysdeps/i386/fpu/s_logbl.S: ...here.
+ * sysdeps/libm-i387/s_lrint.S: Moved to ...
+ * sysdeps/i386/fpu/s_lrint.S: ...here.
+ * sysdeps/libm-i387/s_lrintf.S: Moved to ...
+ * sysdeps/i386/fpu/s_lrintf.S: ...here.
+ * sysdeps/libm-i387/s_lrintl.S: Moved to ...
+ * sysdeps/i386/fpu/s_lrintl.S: ...here.
+ * sysdeps/libm-i387/s_nearbyint.S: Moved to ...
+ * sysdeps/i386/fpu/s_nearbyint.S: ...here.
+ * sysdeps/libm-i387/s_nearbyintf.S: Moved to ...
+ * sysdeps/i386/fpu/s_nearbyintf.S: ...here.
+ * sysdeps/libm-i387/s_nearbyintl.S: Moved to ...
+ * sysdeps/i386/fpu/s_nearbyintl.S: ...here.
+ * sysdeps/libm-i387/s_remquo.S: Moved to ...
+ * sysdeps/i386/fpu/s_remquo.S: ...here.
+ * sysdeps/libm-i387/s_remquof.S: Moved to ...
+ * sysdeps/i386/fpu/s_remquof.S: ...here.
+ * sysdeps/libm-i387/s_remquol.S: Moved to ...
+ * sysdeps/i386/fpu/s_remquol.S: ...here.
+ * sysdeps/libm-i387/s_rint.S: Moved to ...
+ * sysdeps/i386/fpu/s_rint.S: ...here.
+ * sysdeps/libm-i387/s_rintf.S: Moved to ...
+ * sysdeps/i386/fpu/s_rintf.S: ...here.
+ * sysdeps/libm-i387/s_rintl.S: Moved to ...
+ * sysdeps/i386/fpu/s_rintl.S: ...here.
+ * sysdeps/libm-i387/s_scalbn.S: Moved to ...
+ * sysdeps/i386/fpu/s_scalbn.S: ...here.
+ * sysdeps/libm-i387/s_scalbnf.S: Moved to ...
+ * sysdeps/i386/fpu/s_scalbnf.S: ...here.
+ * sysdeps/libm-i387/s_scalbnl.S: Moved to ...
+ * sysdeps/i386/fpu/s_scalbnl.S: ...here.
+ * sysdeps/libm-i387/s_significand.S: Moved to ...
+ * sysdeps/i386/fpu/s_significand.S: ...here.
+ * sysdeps/libm-i387/s_significandf.S: Moved to ...
+ * sysdeps/i386/fpu/s_significandf.S: ...here.
+ * sysdeps/libm-i387/s_significandl.S: Moved to ...
+ * sysdeps/i386/fpu/s_significandl.S: ...here.
+ * sysdeps/libm-i387/s_sin.S: Moved to ...
+ * sysdeps/i386/fpu/s_sin.S: ...here.
+ * sysdeps/libm-i387/s_sincos.S: Moved to ...
+ * sysdeps/i386/fpu/s_sincos.S: ...here.
+ * sysdeps/libm-i387/s_sincosf.S: Moved to ...
+ * sysdeps/i386/fpu/s_sincosf.S: ...here.
+ * sysdeps/libm-i387/s_sincosl.S: Moved to ...
+ * sysdeps/i386/fpu/s_sincosl.S: ...here.
+ * sysdeps/libm-i387/s_sinf.S: Moved to ...
+ * sysdeps/i386/fpu/s_sinf.S: ...here.
+ * sysdeps/libm-i387/s_sinl.S: Moved to ...
+ * sysdeps/i386/fpu/s_sinl.S: ...here.
+ * sysdeps/libm-i387/s_tan.S: Moved to ...
+ * sysdeps/i386/fpu/s_tan.S: ...here.
+ * sysdeps/libm-i387/s_tanf.S: Moved to ...
+ * sysdeps/i386/fpu/s_tanf.S: ...here.
+ * sysdeps/libm-i387/s_tanl.S: Moved to ...
+ * sysdeps/i386/fpu/s_tanl.S: ...here.
+ * sysdeps/libm-i387/s_trunc.S: Moved to ...
+ * sysdeps/i386/fpu/s_trunc.S: ...here.
+ * sysdeps/libm-i387/s_truncf.S: Moved to ...
+ * sysdeps/i386/fpu/s_truncf.S: ...here.
+ * sysdeps/libm-i387/s_truncl.S: Moved to ...
+ * sysdeps/i386/fpu/s_truncl.S: ...here.
+ * sysdeps/libm-ieee754/k_standard.c: Moved to ...
+ * sysdeps/ieee754/k_standard.c: ...here.
+ * sysdeps/libm-ieee754/s_lib_version.c: Moved to ...
+ * sysdeps/ieee754/s_lib_version.c: ...here.
+ * sysdeps/libm-ieee754/s_matherr.c: Moved to ...
+ * sysdeps/ieee754/s_matherr.c: ...here.
+ * sysdeps/libm-ieee754/s_signgam.c: Moved to ...
+ * sysdeps/ieee754/s_signgam.c: ...here.
+ * sysdeps/ieee754/dbl2mpn.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/dbl2mpn.c: ...here.
+ * sysdeps/ieee754/mpn2dbl.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/mpn2dbl.c: ...here.
+ * sysdeps/libm-ieee754/e_acos.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_acos.c: ...here.
+ * sysdeps/libm-ieee754/e_acosh.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_acosh.c: ...here.
+ * sysdeps/libm-ieee754/e_asin.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_asin.c: ...here.
+ * sysdeps/libm-ieee754/e_atan2.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_atan2.c: ...here.
+ * sysdeps/libm-ieee754/e_atanh.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_atanh.c: ...here.
+ * sysdeps/libm-ieee754/e_cosh.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_cosh.c: ...here.
+ * sysdeps/libm-ieee754/e_exp.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_exp.c: ...here.
+ * sysdeps/libm-ieee754/e_fmod.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_fmod.c: ...here.
+ * sysdeps/libm-ieee754/e_gamma_r.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_gamma_r.c: ...here.
+ * sysdeps/libm-ieee754/e_hypot.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_hypot.c: ...here.
+ * sysdeps/libm-ieee754/e_j0.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_j0.c: ...here.
+ * sysdeps/libm-ieee754/e_j1.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_j1.c: ...here.
+ * sysdeps/libm-ieee754/e_jn.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_jn.c: ...here.
+ * sysdeps/libm-ieee754/e_lgamma_r.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_lgamma_r.c: ...here.
+ * sysdeps/libm-ieee754/e_log.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_log.c: ...here.
+ * sysdeps/libm-ieee754/e_log10.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_log10.c: ...here.
+ * sysdeps/libm-ieee754/e_pow.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_pow.c: ...here.
+ * sysdeps/libm-ieee754/e_remainder.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_remainder.c: ...here.
+ * sysdeps/libm-ieee754/e_sinh.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_sinh.c: ...here.
+ * sysdeps/libm-ieee754/e_sqrt.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_sqrt.c: ...here.
+ * sysdeps/libm-ieee754/k_cos.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/k_cos.c: ...here.
+ * sysdeps/libm-ieee754/k_sin.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/k_sin.c: ...here.
+ * sysdeps/libm-ieee754/k_tan.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/k_tan.c: ...here.
+ * sysdeps/libm-ieee754/s_asinh.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_asinh.c: ...here.
+ * sysdeps/libm-ieee754/s_atan.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_atan.c: ...here.
+ * sysdeps/libm-ieee754/s_cbrt.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_cbrt.c: ...here.
+ * sysdeps/libm-ieee754/s_ceil.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_ceil.c: ...here.
+ * sysdeps/libm-ieee754/s_copysign.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_copysign.c: ...here.
+ * sysdeps/libm-ieee754/s_cos.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_cos.c: ...here.
+ * sysdeps/libm-ieee754/s_erf.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_erf.c: ...here.
+ * sysdeps/libm-ieee754/s_exp2.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_exp2.c: ...here.
+ * sysdeps/libm-ieee754/s_expm1.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_expm1.c: ...here.
+ * sysdeps/libm-ieee754/s_fabs.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_fabs.c: ...here.
+ * sysdeps/libm-ieee754/s_finite.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_finite.c: ...here.
+ * sysdeps/libm-ieee754/s_floor.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_floor.c: ...here.
+ * sysdeps/libm-ieee754/s_fpclassify.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_fpclassify.c: ...here.
+ * sysdeps/libm-ieee754/s_frexp.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_frexp.c: ...here.
+ * sysdeps/libm-ieee754/s_ilogb.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_ilogb.c: ...here.
+ * sysdeps/libm-ieee754/s_isinf.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_isinf.c: ...here.
+ * sysdeps/libm-ieee754/s_isnan.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_isnan.c: ...here.
+ (__isnan): Comment above function says it returns 0 or 1, but it
+ used to return 0 or -1.
+ * sysdeps/libm-ieee754/s_llrint.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_llrint.c: ...here.
+ * sysdeps/libm-ieee754/s_llround.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_llround.c: ...here.
+ * sysdeps/libm-ieee754/s_log1p.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_log1p.c: ...here.
+ * sysdeps/libm-ieee754/s_log2.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_log2.c: ...here.
+ * sysdeps/libm-ieee754/s_logb.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_logb.c: ...here.
+ * sysdeps/libm-ieee754/s_lrint.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_lrint.c: ...here.
+ * sysdeps/libm-ieee754/s_lround.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_lround.c: ...here.
+ * sysdeps/libm-ieee754/s_modf.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_modf.c: ...here.
+ * sysdeps/libm-ieee754/s_nearbyint.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_nearbyint.c: ...here.
+ * sysdeps/libm-ieee754/s_nextafter.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_nextafter.c: ...here.
+ Add __nexttoward and nexttoward aliases if NO_LONG_DOUBLE.
+ * sysdeps/libm-ieee754/s_remquo.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_remquo.c: ...here.
+ * sysdeps/libm-ieee754/s_rint.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_rint.c: ...here.
+ * sysdeps/libm-ieee754/s_round.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_round.c: ...here.
+ * sysdeps/libm-ieee754/s_scalbn.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_scalbn.c: ...here.
+ * sysdeps/libm-ieee754/s_signbit.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_signbit.c: ...here.
+ * sysdeps/libm-ieee754/s_sin.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_sin.c: ...here.
+ * sysdeps/libm-ieee754/s_sincos.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_sincos.c: ...here.
+ * sysdeps/libm-ieee754/s_tan.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_tan.c: ...here.
+ * sysdeps/libm-ieee754/s_tanh.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_tanh.c: ...here.
+ * sysdeps/libm-ieee754/s_trunc.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_trunc.c: ...here.
+ * sysdeps/libm-ieee754/t_exp2.h: Moved to ...
+ * sysdeps/ieee754/dbl-64/t_exp2.h: ...here.
+ * sysdeps/libm-ieee754/w_exp.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/w_exp.c: ...here.
+ * sysdeps/ieee754/mpn2flt.c: Moved to ...
+ * sysdeps/ieee754/flt-32/mpn2flt.c: ...here.
+ * sysdeps/libm-ieee754/e_acosf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_acosf.c: ...here.
+ * sysdeps/libm-ieee754/e_acoshf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_acoshf.c: ...here.
+ * sysdeps/libm-ieee754/e_asinf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_asinf.c: ...here.
+ * sysdeps/libm-ieee754/e_atan2f.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_atan2f.c: ...here.
+ * sysdeps/libm-ieee754/e_atanhf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_atanhf.c: ...here.
+ * sysdeps/libm-ieee754/e_coshf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_coshf.c: ...here.
+ * sysdeps/libm-ieee754/e_expf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_expf.c: ...here.
+ * sysdeps/libm-ieee754/e_fmodf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_fmodf.c: ...here.
+ * sysdeps/libm-ieee754/e_gammaf_r.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_gammaf_r.c: ...here.
+ * sysdeps/libm-ieee754/e_hypotf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_hypotf.c: ...here.
+ * sysdeps/libm-ieee754/e_j0f.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_j0f.c: ...here.
+ * sysdeps/libm-ieee754/e_j1f.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_j1f.c: ...here.
+ * sysdeps/libm-ieee754/e_jnf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_jnf.c: ...here.
+ * sysdeps/libm-ieee754/e_lgammaf_r.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_lgammaf_r.c: ...here.
+ * sysdeps/libm-ieee754/e_log10f.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_log10f.c: ...here.
+ * sysdeps/libm-ieee754/e_logf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_logf.c: ...here.
+ * sysdeps/libm-ieee754/e_powf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_powf.c: ...here.
+ * sysdeps/libm-ieee754/e_remainderf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_remainderf.c: ...here.
+ * sysdeps/libm-ieee754/e_sinhf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_sinhf.c: ...here.
+ * sysdeps/libm-ieee754/e_sqrtf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_sqrtf.c: ...here.
+ * sysdeps/libm-ieee754/k_cosf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/k_cosf.c: ...here.
+ * sysdeps/libm-ieee754/k_sinf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/k_sinf.c: ...here.
+ * sysdeps/libm-ieee754/k_tanf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/k_tanf.c: ...here.
+ * sysdeps/libm-ieee754/s_asinhf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_asinhf.c: ...here.
+ * sysdeps/libm-ieee754/s_atanf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_atanf.c: ...here.
+ * sysdeps/libm-ieee754/s_cbrtf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_cbrtf.c: ...here.
+ * sysdeps/libm-ieee754/s_ceilf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_ceilf.c: ...here.
+ * sysdeps/libm-ieee754/s_copysignf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_copysignf.c: ...here.
+ * sysdeps/libm-ieee754/s_cosf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_cosf.c: ...here.
+ * sysdeps/libm-ieee754/s_erff.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_erff.c: ...here.
+ * sysdeps/libm-ieee754/s_exp2f.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_exp2f.c: ...here.
+ * sysdeps/libm-ieee754/s_expm1f.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_expm1f.c: ...here.
+ * sysdeps/libm-ieee754/s_fabsf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_fabsf.c: ...here.
+ * sysdeps/libm-ieee754/s_finitef.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_finitef.c: ...here.
+ * sysdeps/libm-ieee754/s_floorf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_floorf.c: ...here.
+ * sysdeps/libm-ieee754/s_fpclassifyf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_fpclassifyf.c: ...here.
+ * sysdeps/libm-ieee754/s_frexpf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_frexpf.c: ...here.
+ * sysdeps/libm-ieee754/s_ilogbf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_ilogbf.c: ...here.
+ * sysdeps/libm-ieee754/s_isinff.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_isinff.c: ...here.
+ * sysdeps/libm-ieee754/s_isnanf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_isnanf.c: ...here.
+ * sysdeps/libm-ieee754/s_llrintf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_llrintf.c: ...here.
+ * sysdeps/libm-ieee754/s_llroundf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_llroundf.c: ...here.
+ * sysdeps/libm-ieee754/s_log1pf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_log1pf.c: ...here.
+ * sysdeps/libm-ieee754/s_log2f.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_log2f.c: ...here.
+ * sysdeps/libm-ieee754/s_logbf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_logbf.c: ...here.
+ * sysdeps/libm-ieee754/s_lrintf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_lrintf.c: ...here.
+ * sysdeps/libm-ieee754/s_lroundf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_lroundf.c: ...here.
+ * sysdeps/libm-ieee754/s_modff.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_modff.c: ...here.
+ * sysdeps/libm-ieee754/s_nearbyintf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_nearbyintf.c: ...here.
+ * sysdeps/libm-ieee754/s_nextafterf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_nextafterf.c: ...here.
+ * sysdeps/libm-ieee754/s_remquof.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_remquof.c: ...here.
+ * sysdeps/libm-ieee754/s_rintf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_rintf.c: ...here.
+ * sysdeps/libm-ieee754/s_roundf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_roundf.c: ...here.
+ * sysdeps/libm-ieee754/s_scalbnf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_scalbnf.c: ...here.
+ * sysdeps/libm-ieee754/s_signbitf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_signbitf.c: ...here.
+ * sysdeps/libm-ieee754/s_sincosf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_sincosf.c: ...here.
+ * sysdeps/libm-ieee754/s_sinf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_sinf.c: ...here.
+ * sysdeps/libm-ieee754/s_tanf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_tanf.c: ...here.
+ * sysdeps/libm-ieee754/s_tanhf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_tanhf.c: ...here.
+ * sysdeps/libm-ieee754/s_truncf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_truncf.c: ...here.
+ * sysdeps/libm-ieee754/t_exp2f.h: Moved to ...
+ * sysdeps/ieee754/flt-32/t_exp2f.h: ...here.
+ * sysdeps/libm-ieee754/w_expf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/w_expf.c: ...here.
+ * sysdeps/libm-ieee754/e_acoshl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_acoshl.c: ...here.
+ * sysdeps/libm-ieee754/e_atan2l.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_atan2l.c: ...here.
+ * sysdeps/libm-ieee754/e_atanhl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_atanhl.c: ...here.
+ * sysdeps/libm-ieee754/e_coshl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_coshl.c: ...here.
+ * sysdeps/libm-ieee754/e_gammal_r.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_gammal_r.c: ...here.
+ * sysdeps/libm-ieee754/e_hypotl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_hypotl.c: ...here.
+ * sysdeps/libm-ieee754/e_remainderl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_remainderl.c: ...here.
+ * sysdeps/libm-ieee754/e_sinhl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_sinhl.c: ...here.
+ * sysdeps/libm-ieee754/s_asinhl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_asinhl.c: ...here.
+ * sysdeps/libm-ieee754/s_cbrtl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_cbrtl.c: ...here.
+ * sysdeps/libm-ieee754/s_ceill.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_ceill.c: ...here.
+ * sysdeps/libm-ieee754/s_copysignl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_copysignl.c: ...here.
+ * sysdeps/libm-ieee754/s_cosl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_cosl.c: ...here.
+ * sysdeps/libm-ieee754/s_fabsl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_fabsl.c: ...here.
+ * sysdeps/libm-ieee754/s_finitel.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_finitel.c: ...here.
+ * sysdeps/libm-ieee754/s_floorl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_floorl.c: ...here.
+ * sysdeps/libm-ieee754/s_fpclassifyl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_fpclassifyl.c: ...here.
+ * sysdeps/libm-ieee754/s_frexpl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_frexpl.c: ...here.
+ * sysdeps/libm-ieee754/s_ilogbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_ilogbl.c: ...here.
+ * sysdeps/libm-ieee754/s_llrintl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_llrintl.c: ...here.
+ * sysdeps/libm-ieee754/s_llroundl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_llroundl.c: ...here.
+ * sysdeps/libm-ieee754/s_logbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_logbl.c: ...here.
+ * sysdeps/libm-ieee754/s_lrintl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_lrintl.c: ...here.
+ * sysdeps/libm-ieee754/s_lroundl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_lroundl.c: ...here.
+ * sysdeps/libm-ieee754/s_modfl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_modfl.c: ...here.
+ (__modfl): IEEE 854 long doubles should use SET_LDOUBLE_WORDS, not
+ INSERT_WORDS.
+ * sysdeps/libm-ieee754/s_nearbyintl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_nearbyintl.c: ...here.
+ (__nearbyintl): Fix for exponents 2^30.
+ * sysdeps/libm-ieee754/s_remquol.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_remquol.c: ...here.
+ * sysdeps/libm-ieee754/s_rintl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_rintl.c: ...here.
+ (__rintl): Fix for exponents 2^30.
+ * sysdeps/libm-ieee754/s_roundl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_roundl.c: ...here.
+ * sysdeps/libm-ieee754/s_scalbnl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_scalbnl.c: ...here.
+ (__scalbnl): Fix exponent for subnormal result.
+ * sysdeps/libm-ieee754/s_signbitl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_signbitl.c: ...here.
+ * sysdeps/libm-ieee754/s_sincosl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_sincosl.c: ...here.
+ * sysdeps/libm-ieee754/s_sinl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_sinl.c: ...here.
+ * sysdeps/libm-ieee754/s_tanhl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_tanhl.c: ...here.
+ * sysdeps/libm-ieee754/s_tanl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_tanl.c: ...here.
+ * sysdeps/libm-ieee754/s_truncl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_truncl.c: ...here.
+ * sysdeps/libm-ieee754/w_expl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/w_expl.c: ...here.
+ * sysdeps/libm-i387/i686/s_fminl.S: Moved to ...
+ * sysdeps/i386/i686/fpu/s_fminl.S: ...here.
+ * sysdeps/libm-i387/s_scalblnf.c: Moved to ...
+ * sysdeps/i386/fpu/s_scalblnf.c: ...here.
+ * sysdeps/libm-ieee754/s_scalblnf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_scalblnf.c: ...here.
+ * sysdeps/libm-i387/i686/s_fdiml.S: Moved to ...
+ * sysdeps/i386/i686/fpu/s_fdiml.S: ...here.
+ * sysdeps/libm-i387/e_rem_pio2f.c: Moved to ...
+ * sysdeps/i386/fpu/e_rem_pio2f.c: ...here.
+ * sysdeps/libm-ieee754/e_rem_pio2f.c: Moved to ...
+ * sysdeps/ieee754/flt-32/e_rem_pio2f.c: ...here.
+ * sysdeps/libm-i387/i686/s_fmin.S: Moved to ...
+ * sysdeps/i386/i686/fpu/s_fmin.S: ...here.
+ * sysdeps/libm-i387/k_rem_pio2.c: Moved to ...
+ * sysdeps/i386/fpu/k_rem_pio2.c: ...here.
+ * sysdeps/libm-ieee754/k_rem_pio2.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/k_rem_pio2.c: ...here.
+ * sysdeps/libm-i387/k_rem_pio2f.c: Moved to ...
+ * sysdeps/i386/fpu/k_rem_pio2f.c: ...here.
+ * sysdeps/libm-ieee754/k_rem_pio2f.c: Moved to ...
+ * sysdeps/ieee754/flt-32/k_rem_pio2f.c: ...here.
+ * sysdeps/libm-i387/s_scalbln.c: Moved to ...
+ * sysdeps/i386/fpu/s_scalbln.c: ...here.
+ * sysdeps/libm-ieee754/s_scalbln.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/s_scalbln.c: ...here.
+ * sysdeps/libm-i387/i686/s_fmax.S: Moved to ...
+ * sysdeps/i386/i686/fpu/s_fmax.S: ...here.
+ * sysdeps/libm-i387/t_exp.c: Moved to ...
+ * sysdeps/i386/fpu/t_exp.c: ...here.
+ * sysdeps/libm-ieee754/t_exp.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/t_exp.c: ...here.
+ * sysdeps/libm-i387/e_rem_pio2.c: Moved to ...
+ * sysdeps/i386/fpu/e_rem_pio2.c: ...here.
+ * sysdeps/libm-ieee754/e_rem_pio2.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/e_rem_pio2.c: ...here.
+ * sysdeps/libm-i387/s_isinfl.c: Moved to ...
+ * sysdeps/i386/fpu/s_isinfl.c: ...here.
+ * sysdeps/libm-ieee754/s_isinfl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_isinfl.c: ...here.
+ * sysdeps/libm-i387/s_scalblnl.c: Moved to ...
+ * sysdeps/i386/fpu/s_scalblnl.c: ...here.
+ * sysdeps/libm-ieee754/s_scalblnl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_scalblnl.c: ...here.
+ Fix exponent for subnormal result.
+ * sysdeps/libm-ieee754/s_nexttowardl.c: Moved to ...
+ * math/s_nexttowardl.c: ...here.
+ * sysdeps/libm-i387/i686/s_fmaxf.S: Moved to ...
+ * sysdeps/i386/i686/fpu/s_fmaxf.S: ...here.
+ * sysdeps/libm-i387/s_isnanl.c: Moved to ...
+ * sysdeps/i386/fpu/s_isnanl.c: ...here.
+ * sysdeps/libm-ieee754/s_isnanl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_isnanl.c: ...here.
+ Comment above function says it returns 0 or 1, but it used to return
+ 0 or -1.
+ * sysdeps/libm-i387/i686/s_fminf.S: Moved to ...
+ * sysdeps/i386/i686/fpu/s_fminf.S: ...here.
+ * sysdeps/libm-i387/i686/s_fdim.S: Moved to ...
+ * sysdeps/i386/i686/fpu/s_fdim.S: ...here.
+ * sysdeps/libm-i387/i686/s_fdimf.S: Moved to ...
+ * sysdeps/i386/i686/fpu/s_fdimf.S: ...here.
+ * sysdeps/libm-i387/i686/s_fmaxl.S: Moved to ...
+ * sysdeps/i386/i686/fpu/s_fmaxl.S: ...here.
+ * sysdeps/libm-ieee754/s_nexttoward.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_nexttoward.c: ...here.
+ Cannot compare exponents with different biases without adjusting.
+ * sysdeps/libm-ieee754/s_nexttowardf.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_nexttowardf.c: ...here.
+ Cannot compare exponents with different biases without adjusting.
+ * sysdeps/libm-i387/s_nextafterl.c: Moved to ...
+ * sysdeps/i386/fpu/s_nextafterl.c: ...here.
+ * sysdeps/libm-ieee754/s_nextafterl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/s_nextafterl.c: ...here.
+ * sysdeps/ieee754/ldbl2mpn.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/ldbl2mpn.c: ...here.
+ Removed __NO_LONG_DOUBLE_MATH ifndef around the whole file.
+ * sysdeps/ieee754/mpn2ldbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/mpn2ldbl.c: ...here.
+ Removed __NO_LONG_DOUBLE_MATH ifndef around the whole file.
+ * sysdeps/libm-ieee754/Dist: Split into ...
+ * sysdeps/ieee754/dbl-64/Dist: ...this and ...
+ * sysdeps/ieee754/flt-32/Dist: ...this file.
+
+ * sysdeps/ieee754/flt-32/Implies: New file.
+ * sysdeps/ieee754/dbl-64/Implies: New file.
+ * sysdeps/ieee754/dbl-64/math_ldbl.h: New file.
+ * sysdeps/ieee754/dbl-64/s_nexttoward.c: New file.
+ * sysdeps/ieee754/dbl-64/s_nexttowardf.c: New file.
+ * sysdeps/ieee754/dbl-64/strtold.c: New file.
+ * sysdeps/ieee754/dbl-64/mpn2ldbl.c: New file.
+ * sysdeps/ieee754/dbl-64/ldbl2mpn.c: New file.
+ * sysdeps/ieee754/ldbl-96/Implies: New file.
+ * sysdeps/ieee754/ldbl-96/math_ldbl.h: New file.
+ * sysdeps/ieee754/ldbl-96/strtold.c: New file.
+ * sysdeps/ieee754/ldbl-96/printf_fphex.c: New file.
+ * sysdeps/ieee754/ldbl-128/Implies: New file.
+ * sysdeps/ieee754/ldbl-128/s_sinl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_ceill.c: New file.
+ * sysdeps/ieee754/ldbl-128/e_remainderl.c: New file.
+ * sysdeps/ieee754/ldbl-128/ieee754.h: New file.
+ * sysdeps/ieee754/ldbl-128/e_atan2l.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_finitel.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_roundl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_llrintl.c: New file.
+ * sysdeps/ieee754/ldbl-128/e_gammal_r.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_llroundl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_sincosl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_cosl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_fpclassifyl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_ilogbl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_floorl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_logbl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_scalbnl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_remquol.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_nearbyintl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_tanl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_rintl.c: New file.
+ * sysdeps/ieee754/ldbl-128/e_acoshl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_lroundl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_signbitl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_copysignl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_fabsl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_frexpl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_truncl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_modfl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_lrintl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_isinfl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_scalblnl.c: New file.
+ * sysdeps/ieee754/ldbl-128/e_fmodl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_isnanl.c: New file.
+ * sysdeps/ieee754/ldbl-128/math_ldbl.h: New file.
+ * sysdeps/ieee754/ldbl-128/strtold.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_nextafterl.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_nexttoward.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_nexttowardf.c: New file.
+ * sysdeps/ieee754/ldbl-128/printf_fphex.c: New file.
+ * sysdeps/ieee754/ldbl-128/mpn2ldbl.c: New file.
+ * sysdeps/ieee754/ldbl-128/ldbl2mpn.c: New file.
+
+ * math/machine/endian.h: Remove.
+ * sysdeps/i386/fpu/Implies: Remove.
+ * sysdeps/ieee754/Implies: Remove.
+
+ * math/math_private.h: Move long double macros to math_ldbl.h
+ header.
+
1999-07-12 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/getaddrinfo.c (gaih_inet): For non-passive
+++ /dev/null
-/* math_private.h wants to include <machine/endian.h>; we provide this
- file so it can, leaving math_private.h unmodified from the original. */
-
-#include <endian.h>
#ifndef _MATH_PRIVATE_H_
#define _MATH_PRIVATE_H_
-#include <machine/endian.h>
+#include <endian.h>
#include <sys/types.h>
/* The original fdlibm code used statements like:
(d) = sf_u.value; \
} while (0)
-/* 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)
-
+/* Get long double macros from a separate header. */
+#include <math_ldbl.h>
/* ieee style elementary functions */
extern double __ieee754_sqrt __P((double));
{
if (scalesize == 0)
{
- tmpsize = powers->arraysize;
- memcpy (tmp, &__tens[powers->arrayoff],
- tmpsize * sizeof (mp_limb_t));
+#ifndef __NO_LONG_DOUBLE_MATH
+ if (LDBL_MANT_DIG > _FPIO_CONST_OFFSET * BITS_PER_MP_LIMB
+ && info->is_long_double)
+ {
+#define _FPIO_CONST_SHIFT \
+ (((LDBL_MANT_DIG + BITS_PER_MP_LIMB - 1) / BITS_PER_MP_LIMB) \
+ - _FPIO_CONST_OFFSET)
+ /* 64bit const offset is not enough for
+ IEEE quad long double. */
+ tmpsize = powers->arraysize + _FPIO_CONST_SHIFT;
+ memcpy (tmp + _FPIO_CONST_SHIFT,
+ &__tens[powers->arrayoff],
+ tmpsize * sizeof (mp_limb_t));
+ MPN_ZERO (tmp, _FPIO_CONST_SHIFT);
+ }
+ else
+#endif
+ {
+ tmpsize = powers->arraysize;
+ memcpy (tmp, &__tens[powers->arrayoff],
+ tmpsize * sizeof (mp_limb_t));
+ }
}
else
{
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
wordsize-32
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
--- /dev/null
+#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>
--- /dev/null
+#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>
--- /dev/null
+#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>
--- /dev/null
+#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>
--- /dev/null
+#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>
-/* 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. */
--- /dev/null
+#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. */
-/* 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. */
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;
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
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)
--- /dev/null
+#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>
--- /dev/null
+#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>
#ifdef NO_LONG_DOUBLE
strong_alias (__nextafter, __nextafterl)
weak_alias (__nextafter, nextafterl)
+strong_alias (__nextafter, __nexttoward)
+weak_alias (__nextafter, nexttoward)
#endif
--- /dev/null
+/* 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)
/*
* 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.
*/
long double x;
#endif
{
- return __ieee754_scalbl(x,(double) -ilogbl(x));
+ return __ieee754_scalbl(x,(long double) -ilogbl(x));
}
weak_alias (__significandl, significandl)
--- /dev/null
+#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>
-#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)
--- /dev/null
+#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)
wordsize-32
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
+ieee754/ldbl-96
+++ /dev/null
-# For x86 machines with FPU, use the i387 port of libm by JT Conklin.
-libm-i387
# 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
# i960 family uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
+++ /dev/null
-# For all IEEE machines, use Sun's fdlibm code.
-libm-ieee754
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
--- /dev/null
+/* This function is the same as nextafter so we use an alias there. */
--- /dev/null
+/* 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));
+ }
+}
--- /dev/null
+/* 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(-,-) */
+ }
+}
--- /dev/null
+/* 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 */
+}
--- /dev/null
+/* 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));
+}
--- /dev/null
+/* 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;
+}
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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;
+}
--- /dev/null
+#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)
+
--- /dev/null
+/* 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;
+}
--- /dev/null
+/* 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>
--- /dev/null
+/* 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)
--- /dev/null
+/* s_copysignl.c -- long double version of s_copysign.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.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * 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 __copysignl(long double x, long double y)
+#else
+ long double __copysignl(x,y)
+ long double x,y;
+#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 (__copysignl, copysignl)
--- /dev/null
+/* 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)
--- /dev/null
+/* s_fabsl.c -- long double version of s_fabs.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
+
+/*
+ * fabsl(x) returns the absolute value of x.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ long double __fabsl(long double x)
+#else
+ long double __fabsl(x)
+ long double x;
+#endif
+{
+ u_int64_t hx;
+ GET_LDOUBLE_MSW64(hx,x);
+ SET_LDOUBLE_MSW64(x,hx&0x7fffffffffffffffLL);
+ return x;
+}
+weak_alias (__fabsl, fabsl)
--- /dev/null
+/* s_finitel.c -- long double version of s_finite.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
+
+/*
+ * finitel(x) returns 1 is x is finite, else 0;
+ * no branching!
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ int __finitel(long double x)
+#else
+ int __finitel(x)
+ long double x;
+#endif
+{
+ int64_t hx;
+ GET_LDOUBLE_MSW64(hx,x);
+ return (int)((u_int64_t)((hx&0x7fffffffffffffffLL)
+ -0x7fff000000000000LL)>>63);
+}
+weak_alias (__finitel, finitel)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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;
+}
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/*
+ * 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)
--- /dev/null
+/* s_isnanl.c -- long double version of s_isnan.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.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/*
+ * isnanl(x) returns 1 is x is nan, else 0;
+ * no branching!
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ int __isnanl(long double x)
+#else
+ int __isnanl(x)
+ long double x;
+#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 (__isnanl, isnanl)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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;
+}
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
--- /dev/null
+/* 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"
#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
return N;
}
-
-#endif /* __NO_LONG_DOUBLE_MATH */
--- /dev/null
+#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)
#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. */
return u.d;
}
-
-#endif /* __NO_LONG_DOUBLE_MATH */
--- /dev/null
+#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>
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)
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));
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) {
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 */
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 */
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 */
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) {
{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;
}
{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;
}
--- /dev/null
+/* 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"
wordsize-32
# 68k uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
+ieee754/ldbl-96
#define LONG_DOUBLE_DENORM_BIAS IEEE854_LONG_DOUBLE_BIAS
-#include <sysdeps/generic/printf_fphex.c>
+#include <sysdeps/ieee754/ldbl-96/printf_fphex.c>
#define DENORM_EXP (MIN_EXP - 1)
-#include <sysdeps/generic/strtold.c>
+#include <sysdeps/ieee754/ldbl-96/strtold.c>
wordsize-32
# MIPS uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
wordsize-64
# MIPS uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
wordsize-32
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
+++ /dev/null
-# SPARC uses IEEE 754 floating point.
-ieee754
-/* 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
# 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! */
#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
--- /dev/null
+/* 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__ */
wordsize-32
+# SPARC uses IEEE 754 floating point.
+ieee754/flt-32
+ieee754/dbl-64
--- /dev/null
+/* `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. */
wordsize-64
+# SPARC uses IEEE 754 floating point.
+ieee754/flt-32
+ieee754/dbl-64
+ieee754/ldbl-128
-# 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
/* 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.
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
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)
--- /dev/null
+/* Determine the wordsize from the preprocessor defines. */
+
+#if defined __sparc_v9__ || defined __arch64__ || defined __sparcv9
+# define __WORDSIZE 64
+#else
+# define __WORDSIZE 32
+#endif
--- /dev/null
+/* `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. */