[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17616 - in /fsf/trunk/libc: ./ elf/ math/ nptl/ nptl/sysdeps/unix/sysv/linux/sparc/sparc32/ sysdeps/generic/ sysdeps/i386/f...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17616 - in /fsf/trunk/libc: ./ elf/ math/ nptl/ nptl/sysdeps/unix/sysv/linux/sparc/sparc32/ sysdeps/generic/ sysdeps/i386/f...
- From: eglibc@xxxxxxxxxx
- Date: Sat, 17 Mar 2012 00:01:52 -0000
Author: eglibc
Date: Sat Mar 17 00:01:51 2012
New Revision: 17616
Log:
Import glibc-mainline for 2012-03-17
Added:
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_cosl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_sinl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_tanl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/t_sincosl.c
fsf/trunk/libc/sysdeps/sparc/fpu/math_private.h
fsf/trunk/libc/sysdeps/sparc/sparc-ifunc.h
fsf/trunk/libc/sysdeps/sparc/sparc32/fpu/s_fma.c
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_fma.c
Removed:
fsf/trunk/libc/sysdeps/i386/fpu/e_rem_pio2l.c
fsf/trunk/libc/sysdeps/i386/fpu/k_rem_pio2.c
fsf/trunk/libc/sysdeps/i386/fpu/mptan.c
fsf/trunk/libc/sysdeps/i386/fpu/s_cosl.S
fsf/trunk/libc/sysdeps/i386/fpu/s_sincosl.S
fsf/trunk/libc/sysdeps/i386/fpu/s_sinl.S
fsf/trunk/libc/sysdeps/i386/fpu/s_tan.S
fsf/trunk/libc/sysdeps/i386/fpu/s_tanl.S
fsf/trunk/libc/sysdeps/x86_64/fpu/e_rem_pio2l.c
fsf/trunk/libc/sysdeps/x86_64/fpu/k_cosl.c
fsf/trunk/libc/sysdeps/x86_64/fpu/k_sinl.c
fsf/trunk/libc/sysdeps/x86_64/fpu/k_tanl.c
fsf/trunk/libc/sysdeps/x86_64/fpu/s_cosl.S
fsf/trunk/libc/sysdeps/x86_64/fpu/s_sincosl.S
fsf/trunk/libc/sysdeps/x86_64/fpu/s_sinl.S
fsf/trunk/libc/sysdeps/x86_64/fpu/s_tanl.S
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/aclocal.m4
fsf/trunk/libc/configure
fsf/trunk/libc/configure.in
fsf/trunk/libc/elf/cache.c
fsf/trunk/libc/math/libm-test.inc
fsf/trunk/libc/math/w_j0.c
fsf/trunk/libc/math/w_j0f.c
fsf/trunk/libc/math/w_j0l.c
fsf/trunk/libc/math/w_j1.c
fsf/trunk/libc/math/w_j1f.c
fsf/trunk/libc/math/w_j1l.c
fsf/trunk/libc/math/w_jn.c
fsf/trunk/libc/math/w_jnf.c
fsf/trunk/libc/math/w_jnl.c
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/sysdeps/generic/ldconfig.h
fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps
fsf/trunk/libc/sysdeps/ieee754/dbl-64/k_rem_pio2.c
fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_tan.c
fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c
fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_cosl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_sinl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_tanl.c
fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/readelflib.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/dl-cache.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/ldconfig.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/makecontext.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/readelflib.c
fsf/trunk/libc/sysdeps/x86_64/elf/start.S
fsf/trunk/libc/sysdeps/x86_64/ffsll.c
fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps
fsf/trunk/libc/time/offtime.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Mar 17 00:01:51 2012
@@ -1,3 +1,218 @@
+2012-03-16 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/fpu/libm-test/ulps: Update.
+
+2012-03-16 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/x86_64/ffsll.c (ffsl): Define alias only under
+ [__LP64__].
+
+2012-03-16 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c: Moved to ...
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c: This.
+ (__lround): Renamed to ...
+ (__llround): This. Replace long int with long long int.
+ Define lround functions as aliases of llround functions.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c: Empty file.
+
+2012-03-16 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext):
+ Use greg_t on sp. Use unsigned int on idx_uc_link. Cast
+ adresses to uintptr_t. Replace "long int" and "unsigned long
+ int" with "greg_t" on va_arg.
+
+2012-03-16 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/generic/ldconfig.h (FLAG_X8664_LIBX32): New macro.
+ * elf/cache.c (print_entry): Handle FLAG_X8664_LIBX32.
+
+ * sysdeps/unix/sysv/linux/i386/readelflib.c (process_elf_file):
+ Move e_machine check before EI_CLASS check. Handle x32
+ libraries. Check EM_IA_64 only if SKIP_EM_IA_64 isn't defined.
+ * sysdeps/unix/sysv/linux/x86_64/readelflib.c: Just define
+ SKIP_EM_IA_64 and include
+ <sysdeps/unix/sysv/linux/i386/readelflib.c>.
+
+ * sysdeps/unix/sysv/linux/x86_64/dl-cache.h:
+ Don't include <sysdeps/unix/sysv/linux/sparc/dl-cache.h>.
+ (add_system_dir): New macro.
+
+ * sysdeps/unix/sysv/linux/x86_64/ldconfig.h
+ (SYSDEP_KNOWN_INTERPRETER_NAMES): Add /libx32/ld-linux-x32.so.2.
+
+2012-03-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #2551]
+ [BZ #2552]
+ [BZ #2553]
+ [BZ #2554]
+ [BZ #2562]
+ [BZ #2563]
+ [BZ #2565]
+ [BZ #2566]
+ [BZ #2576]
+ * math/w_j0.c (j0): Don't produce TLOSS errors for POSIX libm.
+ (y0): Likewise.
+ * math/w_j0f.c (j0f): Likewise.
+ (y0f): Likewise.
+ * math/w_j0l.c (__j0l): Likewise.
+ (__y0l): Likewise.
+ * math/w_j1.c (j1): Likewise.
+ (y1): Likewise.
+ * math/w_j1f.c (j1f): Likewise.
+ (y1f): Likewise.
+ * math/w_j1l.c (__j1l): Likewise.
+ (__y1l): Likewise.
+ * math/w_jn.c (jn): Likewise.
+ (yn): Likewise.
+ * math/w_jnf.c (jnf): Likewise.
+ (ynf): Likewise.
+ * math/w_jnl.c (__jnl): Likewise.
+ (__ynl): Likewise.
+ * math/libm-test.inc (j0_test): Add more tests.
+ (j1_test): Likewise.
+ (jn_test): Likewise. Add trailing semicolon to existing test.
+ (y0_test): Likewise.
+ (y1_test): Likewise.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+ [BZ #13851]
+ [BZ #13854]
+ * sysdeps/ieee754/dbl-64/s_tan.c (tan): Use
+ libc_feholdexcept_setround_53bit and libc_feupdateenv_53bit.
+ * sysdeps/ieee754/ldbl-96/k_tanl.c: New file.
+ * sysdeps/ieee754/ldbl-96/s_tanl.c: Include <errno.h>.
+ (__tanl): Set errno for infinite argument.
+ * sysdeps/i386/fpu/mptan.c: Remove.
+ * sysdeps/i386/fpu/s_tan.S: Likewise.
+ * sysdeps/i386/fpu/s_tanl.S: Likewise.
+ * sysdeps/x86_64/fpu/k_tanl.c: Likewise.
+ * sysdeps/x86_64/fpu/s_tanl.S: Likewise.
+ * math/libm-test.inc (tan_test): Add more tests and enable more
+ tests for double and long double.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2012-03-16 Jan Kratochvil <jan.kratochvil@xxxxxxxxxx>
+
+ * sysdeps/x86_64/elf/start.S: Include <sysdep.h>.
+ (_start): Add cfi_startproc, cfi_undefined for rip and cfi_endproc.
+
+2012-03-16 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * aclocal.m4 (LIBC_PRECONFIGURE): New macro.
+ * configure.in: Use it for both main tree and add-ons.
+ * configure: Regenerated.
+
+2012-03-16 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * time/offtime.c (__offtime): Use time_t on days, rem, y and yg.
+
+2012-03-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/ieee754/ldbl-96/t_sincosl.c: Include generator program
+ in comment.
+
+ [BZ #13851]
+ * sysdeps/ieee754/ldbl-96/e_rem_pio2l.c: New file.
+ * sysdeps/ieee754/ldbl-96/k_cosl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/k_sinl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/t_sincosl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/s_cosl.c (__cosl): Correct test for
+ infinite argument.
+ * sysdeps/ieee754/ldbl-96/s_sinl.c (__sinl): Likewise.
+ * sysdeps/ieee754/dbl-64/k_rem_pio2.c: Handle __FLT_EVAL_METHOD__
+ != 0 for prec == 2.
+ * sysdeps/i386/fpu/e_rem_pio2l.c: Remove.
+ * sysdeps/i386/fpu/k_rem_pio2.c: Likewise.
+ * sysdeps/i386/fpu/s_cosl.S: Likewise.
+ * sysdeps/i386/fpu/s_sincosl.S: Likewise.
+ * sysdeps/i386/fpu/s_sinl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_rem_pio2l.c: Likewise.
+ * sysdeps/x86_64/fpu/k_cosl.c: Likewise.
+ * sysdeps/x86_64/fpu/k_sinl.c: Likewise.
+ * sysdeps/x86_64/fpu/s_cosl.S: Likewise.
+ * sysdeps/x86_64/fpu/s_sincosl.S: Likewise.
+ * sysdeps/x86_64/fpu/s_sinl.S: Likewise.
+ * math/libm-test.inc (cos_test): Add more tests and enable more
+ tests for long double.
+ (sin_test): Likewise.
+ (sincos_test): Likewise.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2012-03-16 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/fpu/math_private.h: New file.
+
+2012-03-15 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S: New
+ file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S: New
+ file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf.c: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fma-vis3.S: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fma.c: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf-vis3.S: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaf.c: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add fma/fmaf
+ sysdep routines.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Likewise.
+
+ * sysdeps/sparc/sparc32/fpu/s_fma.c: New file.
+ * sysdeps/sparc/sparc64/fpu/s_fma.c: New file.
+
+ * sysdeps/sparc/sparc-ifunc.h: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S: Use
+ sparc-ifunc.h
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S:
+ Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S:
+ Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S:
+ Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S:
+ Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S:
+ Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S: Likewise.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S: Likewise.
+
2012-03-15 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/powerpc/fpu/e_hypotf.c: Use double precision instead of
@@ -90,13 +305,17 @@
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_fminf-vis3.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add new vis3
fmin/fmax sysdep routines.
@@ -132,32 +351,49 @@
* sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_rintf-vis3.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S: New file.
- * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add new VIS3 routines.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add new VIS3
+ routines.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S: New
+ file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S: New
+ file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S: New
+ file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: New
+ file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S:
+ New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S: New
+ file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S: New
+ file.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add new VIS3 routines.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add new
+ VIS3 routines.
* sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/multiarch/Implies:
New file.
@@ -174,18 +410,23 @@
available use -Av9d instead of -Av9a.
* sysdeps/sparc/sparc64/Makefile: Likewise.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S: New file.
- * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S:
+ New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S: New
+ file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S:
+ New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S: New
+ file.
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_signbit-vis3.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf-vis3.S: New file.
* sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S: New file.
- * sysdeps/sparc/sparc64/fpu/s_copysign.S (__copysign): Use fzeros/fnegs
- to load 0x80000000 into a float register instead of using the stack.
+ * sysdeps/sparc/sparc64/fpu/s_copysign.S (__copysign): Use
+ fzeros/fnegs to load 0x80000000 into a float register instead of
+ using the stack.
* sysdeps/sparc/sparc64/fpu/s_copysignf.S (__copysignf): Likewise.
2012-03-14 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sat Mar 17 00:01:51 2012
@@ -9,13 +9,14 @@
* The following bugs are resolved with this release:
- 174, 350, 411, 2541, 2547, 2548, 3335, 3976, 3992, 4026, 4108, 4596, 4822,
- 5077, 5461, 5805, 5993, 6884, 6907, 6911, 9739, 9902, 10110, 10135, 10140,
- 10210, 10545, 10716, 11174, 11322, 11365, 11494, 12047, 13058, 13525,
- 13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551,
- 13552, 13553, 13555, 13559, 13566, 13583, 13618, 13637, 13656, 13658,
- 13673, 13695, 13704, 13706, 13726, 13738, 13786, 13792, 13806, 13840,
- 13841, 13846, 13852
+ 174, 350, 411, 2541, 2547, 2548, 2551, 2552, 2553, 2554, 2562, 2563, 2565,
+ 2566, 2576, 3335, 3976, 3992, 4026, 4108, 4596, 4822, 5077, 5461, 5805,
+ 5993, 6884, 6907, 6911, 9739, 9902, 10110, 10135, 10140, 10210, 10545,
+ 10716, 11174, 11322, 11365, 11494, 12047, 13058, 13525, 13526, 13527,
+ 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551, 13552, 13553,
+ 13555, 13559, 13566, 13583, 13618, 13637, 13656, 13658, 13673, 13695,
+ 13704, 13706, 13726, 13738, 13786, 13792, 13806, 13840, 13841, 13844,
+ 13846, 13851, 13852, 13854
* ISO C11 support:
Modified: fsf/trunk/libc/aclocal.m4
==============================================================================
--- fsf/trunk/libc/aclocal.m4 (original)
+++ fsf/trunk/libc/aclocal.m4 Sat Mar 17 00:01:51 2012
@@ -127,3 +127,17 @@
1>&AS_MESSAGE_LOG_FD])],
[$2], [$3])
rm -f conftest*])
+
+dnl Find and source sysdeps/*/preconfigure.
+dnl LIBC_PRECONFIGURE([$srcdir], [for])
+AC_DEFUN([LIBC_PRECONFIGURE], [dnl
+if frags=`ls -d $1/sysdeps/*/preconfigure 2> /dev/null`
+then
+ AC_MSG_CHECKING($2 preconfigure fragments)
+ for frag in $frags; do
+ name=`echo "$frag" | sed 's@/[[^/]]*[$]@@;s@^.*/@@'`
+ echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD
+ . "$frag"
+ done
+ AC_MSG_RESULT()
+fi])
Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Sat Mar 17 00:01:51 2012
@@ -3819,6 +3819,19 @@
fi
+if frags=`ls -d $srcdir/sysdeps/*/preconfigure 2> /dev/null`
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysdeps preconfigure fragments" >&5
+$as_echo_n "checking for sysdeps preconfigure fragments... " >&6; }
+ for frag in $frags; do
+ name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
+ echo $ECHO_N "$name $ECHO_C" >&6
+ . "$frag"
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
+fi
+
# An add-on can set this when it wants to disable the sanity check below.
libc_config_ok=no
@@ -3936,17 +3949,17 @@
fi
if test -n "$libc_add_on"; then
if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking add-on $libc_add_on for preconfigure fragments" >&5
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking add-on $libc_add_on for preconfigure fragments" >&5
$as_echo_n "checking add-on $libc_add_on for preconfigure fragments... " >&6; }
- for frag in $frags; do
- name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
- echo $ECHO_N "$name $ECHO_C" >&6
- . "$frag"
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+ for frag in $frags; do
+ name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
+ echo $ECHO_N "$name $ECHO_C" >&6
+ . "$frag"
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- fi
+fi
use_add_ons="$use_add_ons $libc_add_on"
add_ons_pfx="$add_ons_pfx $libc_add_on/"
test -z "$libc_add_on_canonical" ||
Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Sat Mar 17 00:01:51 2012
@@ -316,6 +316,9 @@
*) submachine="$withval" ;;
esac
])
+
+dnl Let sysdeps/*/preconfigure act here, like they can in add-ons.
+LIBC_PRECONFIGURE([$srcdir], [for sysdeps])
# An add-on can set this when it wants to disable the sanity check below.
libc_config_ok=no
@@ -436,16 +439,7 @@
}
fi
if test -n "$libc_add_on"; then
- if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
- then
- AC_MSG_CHECKING(add-on $libc_add_on for preconfigure fragments)
- for frag in $frags; do
- name=`echo "$frag" | sed 's@/[[^/]]*$@@;s@^.*/@@'`
- echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD
- . "$frag"
- done
- AC_MSG_RESULT()
- fi
+ LIBC_PRECONFIGURE([$libc_add_on_srcdir], [add-on $libc_add_on for])
use_add_ons="$use_add_ons $libc_add_on"
add_ons_pfx="$add_ons_pfx $libc_add_on/"
test -z "$libc_add_on_canonical" ||
Modified: fsf/trunk/libc/elf/cache.c
==============================================================================
--- fsf/trunk/libc/elf/cache.c (original)
+++ fsf/trunk/libc/elf/cache.c Sat Mar 17 00:01:51 2012
@@ -90,6 +90,10 @@
break;
case FLAG_MIPS64_LIBN64:
fputs (",64bit", stdout);
+ break;
+ case FLAG_X8664_LIBX32:
+ fputs (",x32", stdout);
+ break;
case 0:
break;
default:
Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Sat Mar 17 00:01:51 2012
@@ -2112,16 +2112,20 @@
TEST_f_f (cos, 0.75L, 0.731688868873820886311838753000084544L);
-#ifndef TEST_LDOUBLE
- /* Enable for long double once x86 and x86-64 implementations are fixed. */
TEST_f_f (cos, 0x1p65, 0.99888622066058013610642172179340364209972L);
TEST_f_f (cos, -0x1p65, 0.99888622066058013610642172179340364209972L);
-#endif
#ifdef TEST_DOUBLE
TEST_f_f (cos, 0.80190127184058835, 0.69534156199418473);
- TEST_f_f (cos, 1e22, 0.5232147853951389454975944733847);
- TEST_f_f (cos, 0x1p1023, -0.8263698346141479945007856808117);
+#endif
+
+#ifndef TEST_FLOAT
+ TEST_f_f (cos, 1e22, 0.5232147853951389454975944733847094921409L);
+ TEST_f_f (cos, 0x1p1023, -0.826369834614147994500785680811743734805L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_f_f (cos, 0x1p16383L, 0.9210843909921906206874509522505756251609L);
#endif
END (cos);
@@ -3682,6 +3686,12 @@
TEST_f_f (j0, 4.0, -3.9714980986384737228659076845169804197562E-1L);
TEST_f_f (j0, -4.0, -3.9714980986384737228659076845169804197562E-1L);
+ TEST_f_f (j0, 0x1.d7ce3ap+107L, 2.775523647291230802651040996274861694514e-17L);
+
+#ifndef TEST_FLOAT
+ TEST_f_f (j0, -0x1.001000001p+593L, -3.927269966354206207832593635798954916263e-90L);
+#endif
+
END (j0);
}
@@ -3716,6 +3726,12 @@
TEST_f_f (j1, 2.0, 0.576724807756873387202448242269137087L);
TEST_f_f (j1, 8.0, 0.234636346853914624381276651590454612L);
TEST_f_f (j1, 10.0, 0.0434727461688614366697487680258592883L);
+
+ TEST_f_f (j1, 0x1.3ffp+74L, 1.818984347516051243459364437186082741567e-12L);
+
+#ifndef TEST_FLOAT
+ TEST_f_f (j1, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L);
+#endif
END (j1);
}
@@ -3797,7 +3813,9 @@
TEST_ff_f (jn, 6, 2.4048255576957729L, 0.34048184720278336646673682895929161E-2L);
TEST_ff_f (jn, 7, 2.4048255576957729L, 0.60068836573295394221291569249883076E-3L);
TEST_ff_f (jn, 8, 2.4048255576957729L, 0.92165786705344923232879022467054148E-4L);
- TEST_ff_f (jn, 9, 2.4048255576957729L, 0.12517270977961513005428966643852564E-4L)
+ TEST_ff_f (jn, 9, 2.4048255576957729L, 0.12517270977961513005428966643852564E-4L);
+
+ TEST_ff_f (jn, 2, 0x1.ffff62p+99L, -4.43860668048170034334926693188979974489e-16L);
END (jn);
}
@@ -6395,18 +6413,21 @@
TEST_f_f (sin, -M_PI_2l, -1);
TEST_f_f (sin, 0.75L, 0.681638760023334166733241952779893935L);
-#ifndef TEST_LDOUBLE
-
- /* Enable for long double once x86 and x86-64 implementations are fixed. */
TEST_f_f (sin, 0x1p65, -0.047183876212354673805106149805700013943218L);
TEST_f_f (sin, -0x1p65, 0.047183876212354673805106149805700013943218L);
-#endif
#ifdef TEST_DOUBLE
TEST_f_f (sin, 0.80190127184058835, 0.71867942238767868);
TEST_f_f (sin, 2.522464e-1, 2.4957989804940911e-1);
- TEST_f_f (sin, 1e22, -0.8522008497671888017727058937530);
- TEST_f_f (sin, 0x1p1023, 0.5631277798508840248814522055909);
+#endif
+
+#ifndef TEST_FLOAT
+ TEST_f_f (sin, 1e22, -0.8522008497671888017727058937530293682618L);
+ TEST_f_f (sin, 0x1p1023, 0.5631277798508840134529434079444683477104L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_f_f (sin, 0x1p16383L, 0.3893629985894208126948115852610595405563L);
#endif
END (sin);
@@ -6576,16 +6597,20 @@
TEST_extra (sincos, M_PI_6l*2.0, 0.86602540378443864676372317075293616L, 0.5);
TEST_extra (sincos, 0.75L, 0.681638760023334166733241952779893935L, 0.731688868873820886311838753000084544L);
-#ifndef TEST_LDOUBLE
- /* Enable for long double once x86 and x86-64 implementations are fixed. */
TEST_extra (sincos, 0x1p65, -0.047183876212354673805106149805700013943218L, 0.99888622066058013610642172179340364209972L);
TEST_extra (sincos, -0x1p65, 0.047183876212354673805106149805700013943218L, 0.99888622066058013610642172179340364209972L);
-#endif
#ifdef TEST_DOUBLE
TEST_extra (sincos, 0.80190127184058835, 0.71867942238767868, 0.69534156199418473);
- TEST_extra (sincos, 1e22, -0.8522008497671888017727058937530, 0.5232147853951389454975944733847);
- TEST_extra (sincos, 0x1p1023, 0.5631277798508840248814522055909, -0.8263698346141479945007856808117);
+#endif
+
+#ifndef TEST_FLOAT
+ TEST_extra (sincos, 1e22, -0.8522008497671888017727058937530293682618L, 0.5232147853951389454975944733847094921409L);
+ TEST_extra (sincos, 0x1p1023, 0.5631277798508840134529434079444683477104L, -0.826369834614147994500785680811743734805L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_extra (sincos, 0x1p16383L, 0.3893629985894208126948115852610595405563L, 0.9210843909921906206874509522505756251609L);
#endif
END (sincos);
@@ -6785,11 +6810,16 @@
TEST_f_f (tan, M_PI_4l, 1);
TEST_f_f (tan, 0.75L, 0.931596459944072461165202756573936428L);
-#ifdef TEST_FLOAT
- /* Enable for double and long double once x86 and x86-64
- implementations are fixed. */
TEST_f_f (tan, 0x1p65, -0.0472364872359047946798414219288370688827L);
TEST_f_f (tan, -0x1p65, 0.0472364872359047946798414219288370688827L);
+
+#ifndef TEST_FLOAT
+ TEST_f_f (tan, 1e22, -1.628778225606898878549375936939548513545L);
+ TEST_f_f (tan, 0x1p1023, -0.6814476476066215012854144040167365190368L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_f_f (tan, 0x1p16383L, 0.422722393732022337800504160054440141575L);
#endif
END (tan);
@@ -7136,6 +7166,12 @@
TEST_f_f (y0, 8.0, 0.223521489387566220527323400498620359L);
TEST_f_f (y0, 10.0, 0.0556711672835993914244598774101900481L);
+ TEST_f_f (y0, 0x1.3ffp+74L, 1.818984347516051243459467456433028748678e-12L);
+
+#ifndef TEST_FLOAT
+ TEST_f_f (y0, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L);
+#endif
+
END (y0);
}
@@ -7169,6 +7205,12 @@
TEST_f_f (y1, 2.0, -0.107032431540937546888370772277476637L);
TEST_f_f (y1, 8.0, -0.158060461731247494255555266187483550L);
TEST_f_f (y1, 10.0, 0.249015424206953883923283474663222803L);
+
+ TEST_f_f (y1, 0x1.27e204p+99L, -8.881610148467797208469612080785210013461e-16L);
+
+#ifndef TEST_FLOAT
+ TEST_f_f (y1, 0x1.001000001p+593L, 3.927269966354206207832593635798954916263e-90L);
+#endif
END (y1);
}
Modified: fsf/trunk/libc/math/w_j0.c
==============================================================================
--- fsf/trunk/libc/math/w_j0.c (original)
+++ fsf/trunk/libc/math/w_j0.c Sat Mar 17 00:01:51 2012
@@ -26,7 +26,7 @@
j0 (double x)
{
if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
- && _LIB_VERSION != _IEEE_)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
/* j0(|x|>X_TLOSS) */
return __kernel_standard (x, x, 34);
@@ -53,7 +53,7 @@
else if (x == 0.0)
/* d = -one/(x-x) */
return __kernel_standard (x, x, 8);
- else
+ else if (_LIB_VERSION != _POSIX_)
/* y0(x>X_TLOSS) */
return __kernel_standard (x, x, 35);
}
Modified: fsf/trunk/libc/math/w_j0f.c
==============================================================================
--- fsf/trunk/libc/math/w_j0f.c (original)
+++ fsf/trunk/libc/math/w_j0f.c Sat Mar 17 00:01:51 2012
@@ -26,7 +26,7 @@
j0f (float x)
{
if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
- && _LIB_VERSION != _IEEE_)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
/* j0(|x|>X_TLOSS) */
return __kernel_standard_f (x, x, 134);
@@ -51,7 +51,7 @@
else if (x == 0.0f)
/* d = -one/(x-x) */
return __kernel_standard_f (x, x, 108);
- else
+ else if (_LIB_VERSION != _POSIX_)
/* y0(x>X_TLOSS) */
return __kernel_standard_f (x, x, 135);
}
Modified: fsf/trunk/libc/math/w_j0l.c
==============================================================================
--- fsf/trunk/libc/math/w_j0l.c (original)
+++ fsf/trunk/libc/math/w_j0l.c Sat Mar 17 00:01:51 2012
@@ -26,7 +26,7 @@
__j0l (long double x)
{
if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0)
- && _LIB_VERSION != _IEEE_)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
/* j0(|x|>X_TLOSS) */
return __kernel_standard (x, x, 234);
@@ -51,7 +51,7 @@
else if (x == 0.0L)
/* d = -one/(x-x) */
return __kernel_standard (x, x, 208);
- else
+ else if (_LIB_VERSION != _POSIX_)
/* y0(x>X_TLOSS) */
return __kernel_standard (x, x, 235);
}
Modified: fsf/trunk/libc/math/w_j1.c
==============================================================================
--- fsf/trunk/libc/math/w_j1.c (original)
+++ fsf/trunk/libc/math/w_j1.c Sat Mar 17 00:01:51 2012
@@ -26,7 +26,7 @@
j1 (double x)
{
if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
- && _LIB_VERSION != _IEEE_)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
/* j1(|x|>X_TLOSS) */
return __kernel_standard (x, x, 36);
@@ -53,7 +53,7 @@
else if (x == 0.0)
/* d = -one/(x-x) */
return __kernel_standard (x, x, 10);
- else
+ else if (_LIB_VERSION != _POSIX_)
/* y1(x>X_TLOSS) */
return __kernel_standard (x, x, 37);
}
Modified: fsf/trunk/libc/math/w_j1f.c
==============================================================================
--- fsf/trunk/libc/math/w_j1f.c (original)
+++ fsf/trunk/libc/math/w_j1f.c Sat Mar 17 00:01:51 2012
@@ -26,7 +26,7 @@
j1f (float x)
{
if (__builtin_expect (isgreater (fabsf (x), X_TLOSS), 0)
- && _LIB_VERSION != _IEEE_)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
/* j1(|x|>X_TLOSS) */
return __kernel_standard_f (x, x, 136);
@@ -51,7 +51,7 @@
else if (x == 0.0f)
/* d = -one/(x-x) */
return __kernel_standard_f (x, x, 110);
- else
+ else if (_LIB_VERSION != _POSIX_)
/* y1(x>X_TLOSS) */
return __kernel_standard_f (x, x, 137);
}
Modified: fsf/trunk/libc/math/w_j1l.c
==============================================================================
--- fsf/trunk/libc/math/w_j1l.c (original)
+++ fsf/trunk/libc/math/w_j1l.c Sat Mar 17 00:01:51 2012
@@ -26,7 +26,7 @@
__j1l (long double x)
{
if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0)
- && _LIB_VERSION != _IEEE_)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
/* j1(|x|>X_TLOSS) */
return __kernel_standard (x, x, 236);
@@ -51,7 +51,7 @@
else if (x == 0.0L)
/* d = -one/(x-x) */
return __kernel_standard (x, x, 210);
- else
+ else if (_LIB_VERSION != _POSIX_)
/* y1(x>X_TLOSS) */
return __kernel_standard (x, x, 237);
}
Modified: fsf/trunk/libc/math/w_jn.c
==============================================================================
--- fsf/trunk/libc/math/w_jn.c (original)
+++ fsf/trunk/libc/math/w_jn.c Sat Mar 17 00:01:51 2012
@@ -26,7 +26,7 @@
jn (int n, double x)
{
if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
- && _LIB_VERSION != _IEEE_)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
/* jn(n,|x|>X_TLOSS) */
return __kernel_standard (n, x, 38);
@@ -53,7 +53,7 @@
else if (x == 0.0)
/* d = -one/(x-x) */
return __kernel_standard (n, x, 12);
- else
+ else if (_LIB_VERSION != _POSIX_)
/* yn(n,x>X_TLOSS) */
return __kernel_standard (n, x, 39);
}
Modified: fsf/trunk/libc/math/w_jnf.c
==============================================================================
--- fsf/trunk/libc/math/w_jnf.c (original)
+++ fsf/trunk/libc/math/w_jnf.c Sat Mar 17 00:01:51 2012
@@ -26,7 +26,7 @@
jnf (int n, float x)
{
if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
- && _LIB_VERSION != _IEEE_)
+ && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_)
/* jn(n,|x|>X_TLOSS) */
return __kernel_standard_f (n, x, 138);
@@ -51,7 +51,7 @@
else if (x == 0.0)
/* d = -one/(x-x) */
return __kernel_standard_f (n, x, 112);
- else
+ else if (_LIB_VERSION != _POSIX_)
/* yn(n,x>X_TLOSS) */
return __kernel_standard_f (n, x, 139);
}
Modified: fsf/trunk/libc/math/w_jnl.c
==============================================================================
--- fsf/trunk/libc/math/w_jnl.c (original)
+++ fsf/trunk/libc/math/w_jnl.c Sat Mar 17 00:01:51 2012
@@ -54,7 +54,10 @@
#else
long double z;
z = __ieee754_jnl(n,x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
+ if (_LIB_VERSION == _IEEE_
+ || _LIB_VERSION == _POSIX_
+ || __isnanl(x))
+ return z;
if(fabsl(x)>X_TLOSS) {
return __kernel_standard((double)n,x,238); /* jn(|x|>X_TLOSS,n) */
} else
@@ -79,7 +82,7 @@
/* d = zero/(x-x); */
return __kernel_standard((double)n,x,213);
}
- if(x>X_TLOSS) {
+ if(x>X_TLOSS && _LIB_VERSION != _POSIX_) {
return __kernel_standard((double)n,x,239); /* yn(x>X_TLOSS,n) */
} else
return z;
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sat Mar 17 00:01:51 2012
@@ -1,3 +1,8 @@
+2012-03-15 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ [BZ #13844]
+ * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
+
2012-03-09 Paul Eggert <eggert@xxxxxxxxxxx>
[BZ #13673]
Added: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c (added)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c Sat Mar 17 00:01:51 2012
@@ -1,0 +1,1 @@
+#include "lowlevellock.c"
Modified: fsf/trunk/libc/sysdeps/generic/ldconfig.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/ldconfig.h (original)
+++ fsf/trunk/libc/sysdeps/generic/ldconfig.h Sat Mar 17 00:01:51 2012
@@ -33,6 +33,7 @@
#define FLAG_POWERPC_LIB64 0x0500
#define FLAG_MIPS64_LIBN32 0x0600
#define FLAG_MIPS64_LIBN64 0x0700
+#define FLAG_X8664_LIBX32 0x0800
/* Name of auxiliary cache. */
#define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
Removed: fsf/trunk/libc/sysdeps/i386/fpu/e_rem_pio2l.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/e_rem_pio2l.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/e_rem_pio2l.c (removed)
@@ -1,3 +1,0 @@
-/* Empty. This file is only meant to avoid compiling the file with the
- same name in the libm-ieee754 directory. The code is not used since
- there is an assembler version for all users of this file. */
Removed: fsf/trunk/libc/sysdeps/i386/fpu/k_rem_pio2.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/k_rem_pio2.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/k_rem_pio2.c (removed)
@@ -1,3 +1,0 @@
-/* Empty. This file is only meant to avoid compiling the file with the
- same name in the libm-ieee754 directory. The code is not used since
- there is an assembler version for all users of this file. */
Modified: fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps Sat Mar 17 00:01:51 2012
@@ -569,12 +569,18 @@
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "cos_downward (2) == -0.4161468365471423869975682295007621897660":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "cos_downward (3) == -0.9899924966004454572715727947312613023937":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "cos_downward (4) == -0.6536436208636119146391681830977503814241":
float: 1
ifloat: 1
@@ -649,6 +655,8 @@
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# cos_upward
Test "cos_upward (1) == 0.5403023058681397174009366074429766037323":
@@ -672,6 +680,8 @@
Test "cos_upward (4) == -0.6536436208636119146391681830977503814241":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "cos_upward (5) == 0.2836621854632262644666391715135573083344":
double: 1
idouble: 1
@@ -692,6 +702,11 @@
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "cos_upward (9) == -0.9111302618846769883682947111811653112463":
+ildouble: 1
+ldouble: 1
# cosh
Test "cosh (0.75) == 1.29468328467684468784170818539018176":
@@ -1009,13 +1024,19 @@
float: 1
# j0
+Test "j0 (-0x1.001000001p+593) == -3.927269966354206207832593635798954916263e-90":
+ildouble: 2
+ldouble: 2
Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
double: 1
float: 2
idouble: 1
ifloat: 2
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
+Test "j0 (0x1.d7ce3ap+107) == 2.775523647291230802651040996274861694514e-17":
+float: 1
+ifloat: 1
Test "j0 (10.0) == -0.245935764451348335197760862485328754":
double: 3
float: 1
@@ -1031,8 +1052,8 @@
float: 2
idouble: 1
ifloat: 2
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Test "j0 (8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
@@ -1041,6 +1062,14 @@
Test "j1 (0.75) == 0.349243602174862192523281016426251335":
double: 1
idouble: 1
+Test "j1 (0x1.3ffp+74) == 1.818984347516051243459364437186082741567e-12":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "j1 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127":
+double: 1
+idouble: 1
Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
double: 2
float: 1
@@ -1065,8 +1094,8 @@
float: 2
idouble: 1
ifloat: 2
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
double: 3
float: 1
@@ -1082,8 +1111,8 @@
float: 2
idouble: 1
ifloat: 2
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
@@ -1143,6 +1172,11 @@
idouble: 2
ildouble: 1
ldouble: 1
+Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703":
double: 1
float: 1
@@ -1400,6 +1434,8 @@
Test "sin_upward (10) == -0.5440211108893698134047476618513772816836":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "sin_upward (2) == 0.9092974268256816953960198659117448427023":
float: 1
ifloat: 1
@@ -1410,12 +1446,18 @@
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "sin_upward (4) == -0.7568024953079282513726390945118290941359":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "sin_upward (5) == -0.9589242746631384688931544061559939733525":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "sin_upward (6) == -0.2794154981989258728115554466118947596280":
ildouble: 1
ldouble: 1
@@ -1516,6 +1558,12 @@
ldouble: 7
# tan
+Test "tan (0x1p16383) == 0.422722393732022337800504160054440141575":
+ildouble: 1
+ldouble: 1
+Test "tan (1e22) == -1.628778225606898878549375936939548513545":
+ildouble: 1
+ldouble: 1
Test "tan (pi/4) == 1":
double: 1
float: 1
@@ -1528,9 +1576,13 @@
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "tan_downward (10) == 0.6483608274590866712591249330098086768169":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "tan_downward (2) == -2.1850398632615189916433061023136825434320":
double: 1
float: 1
@@ -1591,9 +1643,13 @@
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "tan_towardzero (10) == 0.6483608274590866712591249330098086768169":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "tan_towardzero (2) == -2.1850398632615189916433061023136825434320":
ildouble: 1
ldouble: 1
@@ -1658,8 +1714,8 @@
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Test "tan_upward (6) == -0.2910061913847491570536995888681755428312":
ildouble: 1
ldouble: 1
@@ -1708,6 +1764,14 @@
float: 1
idouble: 1
ifloat: 1
+Test "y0 (0x1.3ffp+74) == 1.818984347516051243459467456433028748678e-12":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0x1.ff00000000002p+840) == 1.846591691699331493194965158699937660696e-127":
+double: 1
+idouble: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
@@ -1737,6 +1801,16 @@
# y1
Test "y1 (0.125) == -5.19993611253477499595928744876579921":
+ildouble: 1
+ldouble: 1
+Test "y1 (0x1.001000001p+593) == 3.927269966354206207832593635798954916263e-90":
+ildouble: 2
+ldouble: 2
+Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
ildouble: 1
ldouble: 1
Test "y1 (1.0) == -0.781212821300288716547150000047964821":
@@ -2209,8 +2283,8 @@
float: 2
idouble: 3
ifloat: 2
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "j1":
double: 2
@@ -2343,6 +2417,8 @@
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "tan_downward":
double: 1
@@ -2395,8 +2471,8 @@
float: 2
idouble: 2
ifloat: 2
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "yn":
double: 2
Removed: fsf/trunk/libc/sysdeps/i386/fpu/mptan.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/mptan.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/mptan.c (removed)
@@ -1,1 +1,0 @@
-/* Not needed. */
Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_cosl.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_cosl.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_cosl.S (removed)
@@ -1,54 +1,0 @@
-/*
- * Written by J.T. Conklin <jtc@xxxxxxxxxx>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@xxxxxxxxxx>.
- * Fixed errno handling by Ulrich Drepper <drepper@xxxxxxxxxx>.
- */
-
-#define __need_Emath
-#include <bits/errno.h>
-#include <machine/asm.h>
-
-ENTRY(__cosl)
- fldt 4(%esp)
- fxam
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 3f
-4: fcos
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- ret
- .align ALIGNARG(4)
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fnstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fcos
- ret
-3:
-#ifdef PIC
- pushl %ebx
- cfi_adjust_cfa_offset (4)
- cfi_rel_offset (ebx, 0)
- LOAD_PIC_REG (bx)
- call __errno_location@PLT
- movl $EDOM, (%eax)
- popl %ebx
- cfi_adjust_cfa_offset (-4)
- cfi_restore (ebx)
-#else
- call __errno_location@PLT
- movl $EDOM, (%eax)
-#endif
- jmp 4b
-END (__cosl)
-weak_alias (__cosl, cosl)
Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_sincosl.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_sincosl.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_sincosl.S (removed)
@@ -1,64 +1,0 @@
-/* Compute sine and cosine of argument.
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <machine/asm.h>
-#include "bp-sym.h"
-#include "bp-asm.h"
-
-#define PARMS LINKAGE /* no space for saved regs */
-#define ANGLE PARMS
-#define SINP ANGLE+12
-#define COSP SINP+PTR_SIZE
-
- .text
-ENTRY (BP_SYM (__sincosl))
- ENTER
-
- fldt ANGLE(%esp)
- fsincos
- movl SINP(%esp), %ecx
- CHECK_BOUNDS_BOTH_WIDE (%ecx, SINP(%esp), $12)
- movl COSP(%esp), %edx
- CHECK_BOUNDS_BOTH_WIDE (%edx, COSP(%esp), $12)
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- fstpt (%edx)
- fstpt (%ecx)
-
- LEAVE
- ret
-
- .align ALIGNARG(4)
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fnstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fsincos
- fstpt (%edx)
- fstpt (%ecx)
-
- LEAVE
- ret
-END (BP_SYM (__sincosl))
-weak_alias (BP_SYM (__sincosl), BP_SYM (sincosl))
Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_sinl.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_sinl.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_sinl.S (removed)
@@ -1,54 +1,0 @@
-/*
- * Written by J.T. Conklin <jtc@xxxxxxxxxx>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@xxxxxxxxxx>.
- * Fixed errno handling by Ulrich Drepper <drepper@xxxxxxxxxx>.
- */
-
-#define __need_Emath
-#include <bits/errno.h>
-#include <machine/asm.h>
-
-ENTRY(__sinl)
- fldt 4(%esp)
- fxam
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 3f
-4: fsin
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- ret
- .align ALIGNARG(4)
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fnstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fsin
- ret
-3:
-#ifdef PIC
- pushl %ebx
- cfi_adjust_cfa_offset (4)
- cfi_rel_offset (ebx, 0)
- LOAD_PIC_REG (bx)
- call __errno_location@PLT
- movl $EDOM, (%eax)
- popl %ebx
- cfi_adjust_cfa_offset (-4)
- cfi_restore (ebx)
-#else
- call __errno_location@PLT
- movl $EDOM, (%eax)
-#endif
- jmp 4b
-END (__sinl)
-weak_alias (__sinl, sinl)
Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_tan.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_tan.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_tan.S (removed)
@@ -1,55 +1,0 @@
-/*
- * Written by J.T. Conklin <jtc@xxxxxxxxxx>.
- * Fixed errno handling by Ulrich Drepper <drepper@xxxxxxxxxx>.
- * Public domain.
- */
-
-#define __need_Emath
-#include <bits/errno.h>
-#include <machine/asm.h>
-
-RCSID("$NetBSD: s_tan.S,v 1.5 1995/05/09 00:30:00 jtc Exp $")
-
-ENTRY(__tan)
- fldl 4(%esp)
- fxam
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 3f
-4: fptan
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- fstp %st(0)
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fptan
- fstp %st(0)
- ret
-3:
-#ifdef PIC
- pushl %ebx
- cfi_adjust_cfa_offset (4)
- cfi_rel_offset (ebx, 0)
- LOAD_PIC_REG (bx)
- call __errno_location@PLT
- movl $EDOM, (%eax)
- popl %ebx
- cfi_adjust_cfa_offset (-4)
- cfi_restore (ebx)
-#else
- call __errno_location@PLT
- movl $EDOM, (%eax)
-#endif
- jmp 4b
-END (__tan)
-weak_alias (__tan, tan)
Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_tanl.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_tanl.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_tanl.S (removed)
@@ -1,55 +1,0 @@
-/*
- * Written by J.T. Conklin <jtc@xxxxxxxxxx>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@xxxxxxxxxx>.
- * Fixed errno handling by Ulrich Drepper <drepper@xxxxxxxxxx>.
- */
-
-#define __need_Emath
-#include <bits/errno.h>
-#include <machine/asm.h>
-
-ENTRY(__tanl)
- fldt 4(%esp)
- fxam
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 3f
-4: fptan
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- fstp %st(0)
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fptan
- fstp %st(0)
- ret
-3:
-#ifdef PIC
- pushl %ebx
- cfi_adjust_cfa_offset (4)
- cfi_rel_offset (ebx, 0)
- LOAD_PIC_REG (bx)
- call __errno_location@PLT
- movl $EDOM, (%eax)
- popl %ebx
- cfi_adjust_cfa_offset (-4)
- cfi_restore (ebx)
-#else
- call __errno_location@PLT
- movl $EDOM, (%eax)
-#endif
- jmp 4b
-END (__tanl)
-weak_alias (__tanl, tanl)
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/k_rem_pio2.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/k_rem_pio2.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/k_rem_pio2.c Sat Mar 17 00:01:51 2012
@@ -273,13 +273,16 @@
y[0] = (ih==0)? fw: -fw;
break;
case 1:
- case 2:
- fw = 0.0;
- for (i=jz;i>=0;i--) fw += fq[i];
- y[0] = (ih==0)? fw: -fw;
- fw = fq[0]-fw;
- for (i=1;i<=jz;i++) fw += fq[i];
- y[1] = (ih==0)? fw: -fw;
+ case 2:;
+#if __FLT_EVAL_METHOD__ != 0
+ volatile
+#endif
+ double fv = 0.0;
+ for (i=jz;i>=0;i--) fv += fq[i];
+ y[0] = (ih==0)? fv: -fv;
+ fv = fq[0]-fv;
+ for (i=1;i<=jz;i++) fv += fq[i];
+ y[1] = (ih==0)? fv: -fv;
break;
case 3: /* painful */
for (i=jz;i>0;i--) {
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_tan.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_tan.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_tan.c Sat Mar 17 00:01:51 2012
@@ -74,7 +74,7 @@
int __branred(double, double *, double *);
int __mpranred(double, mp_no *, int);
- libc_feholdexcept_setround (&env, FE_TONEAREST);
+ libc_feholdexcept_setround_53bit (&env, FE_TONEAREST);
/* x=+-INF, x=NaN */
num.d = x; ux = num.i[HIGH_HALF];
@@ -503,7 +503,7 @@
goto ret;
ret:
- libc_feupdateenv (&env);
+ libc_feupdateenv_53bit (&env);
return retval;
}
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c Sat Mar 17 00:01:51 2012
@@ -1,1 +1,79 @@
-/* The code is the same as lround. Use an alias, see l_round.c. */
+/* Round double value to long long int.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define lround __hidden_lround
+#define __lround __hidden___lround
+
+#include <math.h>
+
+#include <math_private.h>
+
+
+long long int
+__llround (double x)
+{
+ int32_t j0;
+ int64_t i0;
+ long long int result;
+ int sign;
+
+ EXTRACT_WORDS64 (i0, x);
+ j0 = ((i0 >> 52) & 0x7ff) - 0x3ff;
+ sign = i0 < 0 ? -1 : 1;
+ i0 &= UINT64_C(0xfffffffffffff);
+ i0 |= UINT64_C(0x10000000000000);
+
+ if (j0 < (int32_t) (8 * sizeof (long long int)) - 1)
+ {
+ if (j0 < 0)
+ return j0 < -1 ? 0 : sign;
+ else if (j0 >= 52)
+ result = i0 << (j0 - 52);
+ else
+ {
+ i0 += UINT64_C(0x8000000000000) >> j0;
+
+ result = i0 >> (52 - j0);
+ }
+ }
+ else
+ {
+ /* The number is too large. It is left implementation defined
+ what happens. */
+ return (long long int) x;
+ }
+
+ return sign * result;
+}
+
+weak_alias (__llround, llround)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__llround, __lroundl)
+weak_alias (__llround, lroundl)
+#endif
+
+/* long has the same width as long long on 64-bit machines. */
+#undef lround
+#undef __lround
+strong_alias (__llround, __lround)
+weak_alias (__llround, lround)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__llround, __llroundl)
+weak_alias (__llround, llroundl)
+#endif
Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c Sat Mar 17 00:01:51 2012
@@ -1,79 +1,1 @@
-/* Round double value to long int.
- Copyright (C) 1997, 2004, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#define llround __hidden_llround
-#define __llround __hidden___llround
-
-#include <math.h>
-
-#include <math_private.h>
-
-
-long int
-__lround (double x)
-{
- int32_t j0;
- int64_t i0;
- long int result;
- int sign;
-
- EXTRACT_WORDS64 (i0, x);
- j0 = ((i0 >> 52) & 0x7ff) - 0x3ff;
- sign = i0 < 0 ? -1 : 1;
- i0 &= UINT64_C(0xfffffffffffff);
- i0 |= UINT64_C(0x10000000000000);
-
- if (j0 < (int32_t) (8 * sizeof (long int)) - 1)
- {
- if (j0 < 0)
- return j0 < -1 ? 0 : sign;
- else if (j0 >= 52)
- result = i0 << (j0 - 52);
- else
- {
- i0 += UINT64_C(0x8000000000000) >> j0;
-
- result = i0 >> (52 - j0);
- }
- }
- else
- {
- /* The number is too large. It is left implementation defined
- what happens. */
- return (long int) x;
- }
-
- return sign * result;
-}
-
-weak_alias (__lround, lround)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lround, __lroundl)
-weak_alias (__lround, lroundl)
-#endif
-
-/* long long has the same width as long on 64-bit machines. */
-#undef llround
-#undef __llround
-strong_alias (__lround, __llround)
-weak_alias (__lround, llround)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lround, __llroundl)
-weak_alias (__lround, llroundl)
-#endif
+/* The code is the same as llround. Use an alias, see s_llround.c. */
Added: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c (added)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/e_rem_pio2l.c Sat Mar 17 00:01:51 2012
@@ -1,0 +1,236 @@
+/* Extended-precision floating point argument reduction.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Based on quad-precision code by Jakub Jelinek <jj@xxxxxxxxxxxxxx>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_private.h>
+
+/* Table of constants for 2/pi, 5628 hexadecimal digits of 2/pi. */
+static const int32_t two_over_pi[] = {
+0xa2f983, 0x6e4e44, 0x1529fc, 0x2757d1, 0xf534dd, 0xc0db62,
+0x95993c, 0x439041, 0xfe5163, 0xabdebb, 0xc561b7, 0x246e3a,
+0x424dd2, 0xe00649, 0x2eea09, 0xd1921c, 0xfe1deb, 0x1cb129,
+0xa73ee8, 0x8235f5, 0x2ebb44, 0x84e99c, 0x7026b4, 0x5f7e41,
+0x3991d6, 0x398353, 0x39f49c, 0x845f8b, 0xbdf928, 0x3b1ff8,
+0x97ffde, 0x05980f, 0xef2f11, 0x8b5a0a, 0x6d1f6d, 0x367ecf,
+0x27cb09, 0xb74f46, 0x3f669e, 0x5fea2d, 0x7527ba, 0xc7ebe5,
+0xf17b3d, 0x0739f7, 0x8a5292, 0xea6bfb, 0x5fb11f, 0x8d5d08,
+0x560330, 0x46fc7b, 0x6babf0, 0xcfbc20, 0x9af436, 0x1da9e3,
+0x91615e, 0xe61b08, 0x659985, 0x5f14a0, 0x68408d, 0xffd880,
+0x4d7327, 0x310606, 0x1556ca, 0x73a8c9, 0x60e27b, 0xc08c6b,
+0x47c419, 0xc367cd, 0xdce809, 0x2a8359, 0xc4768b, 0x961ca6,
+0xddaf44, 0xd15719, 0x053ea5, 0xff0705, 0x3f7e33, 0xe832c2,
+0xde4f98, 0x327dbb, 0xc33d26, 0xef6b1e, 0x5ef89f, 0x3a1f35,
+0xcaf27f, 0x1d87f1, 0x21907c, 0x7c246a, 0xfa6ed5, 0x772d30,
+0x433b15, 0xc614b5, 0x9d19c3, 0xc2c4ad, 0x414d2c, 0x5d000c,
+0x467d86, 0x2d71e3, 0x9ac69b, 0x006233, 0x7cd2b4, 0x97a7b4,
+0xd55537, 0xf63ed7, 0x1810a3, 0xfc764d, 0x2a9d64, 0xabd770,
+0xf87c63, 0x57b07a, 0xe71517, 0x5649c0, 0xd9d63b, 0x3884a7,
+0xcb2324, 0x778ad6, 0x23545a, 0xb91f00, 0x1b0af1, 0xdfce19,
+0xff319f, 0x6a1e66, 0x615799, 0x47fbac, 0xd87f7e, 0xb76522,
+0x89e832, 0x60bfe6, 0xcdc4ef, 0x09366c, 0xd43f5d, 0xd7de16,
+0xde3b58, 0x929bde, 0x2822d2, 0xe88628, 0x4d58e2, 0x32cac6,
+0x16e308, 0xcb7de0, 0x50c017, 0xa71df3, 0x5be018, 0x34132e,
+0x621283, 0x014883, 0x5b8ef5, 0x7fb0ad, 0xf2e91e, 0x434a48,
+0xd36710, 0xd8ddaa, 0x425fae, 0xce616a, 0xa4280a, 0xb499d3,
+0xf2a606, 0x7f775c, 0x83c2a3, 0x883c61, 0x78738a, 0x5a8caf,
+0xbdd76f, 0x63a62d, 0xcbbff4, 0xef818d, 0x67c126, 0x45ca55,
+0x36d9ca, 0xd2a828, 0x8d61c2, 0x77c912, 0x142604, 0x9b4612,
+0xc459c4, 0x44c5c8, 0x91b24d, 0xf31700, 0xad43d4, 0xe54929,
+0x10d5fd, 0xfcbe00, 0xcc941e, 0xeece70, 0xf53e13, 0x80f1ec,
+0xc3e7b3, 0x28f8c7, 0x940593, 0x3e71c1, 0xb3092e, 0xf3450b,
+0x9c1288, 0x7b20ab, 0x9fb52e, 0xc29247, 0x2f327b, 0x6d550c,
+0x90a772, 0x1fe76b, 0x96cb31, 0x4a1679, 0xe27941, 0x89dff4,
+0x9794e8, 0x84e6e2, 0x973199, 0x6bed88, 0x365f5f, 0x0efdbb,
+0xb49a48, 0x6ca467, 0x427271, 0x325d8d, 0xb8159f, 0x09e5bc,
+0x25318d, 0x3974f7, 0x1c0530, 0x010c0d, 0x68084b, 0x58ee2c,
+0x90aa47, 0x02e774, 0x24d6bd, 0xa67df7, 0x72486e, 0xef169f,
+0xa6948e, 0xf691b4, 0x5153d1, 0xf20acf, 0x339820, 0x7e4bf5,
+0x6863b2, 0x5f3edd, 0x035d40, 0x7f8985, 0x295255, 0xc06437,
+0x10d86d, 0x324832, 0x754c5b, 0xd4714e, 0x6e5445, 0xc1090b,
+0x69f52a, 0xd56614, 0x9d0727, 0x50045d, 0xdb3bb4, 0xc576ea,
+0x17f987, 0x7d6b49, 0xba271d, 0x296996, 0xacccc6, 0x5414ad,
+0x6ae290, 0x89d988, 0x50722c, 0xbea404, 0x940777, 0x7030f3,
+0x27fc00, 0xa871ea, 0x49c266, 0x3de064, 0x83dd97, 0x973fa3,
+0xfd9443, 0x8c860d, 0xde4131, 0x9d3992, 0x8c70dd, 0xe7b717,
+0x3bdf08, 0x2b3715, 0xa0805c, 0x93805a, 0x921110, 0xd8e80f,
+0xaf806c, 0x4bffdb, 0x0f9038, 0x761859, 0x15a562, 0xbbcb61,
+0xb989c7, 0xbd4010, 0x04f2d2, 0x277549, 0xf6b6eb, 0xbb22db,
+0xaa140a, 0x2f2689, 0x768364, 0x333b09, 0x1a940e, 0xaa3a51,
+0xc2a31d, 0xaeedaf, 0x12265c, 0x4dc26d, 0x9c7a2d, 0x9756c0,
+0x833f03, 0xf6f009, 0x8c402b, 0x99316d, 0x07b439, 0x15200c,
+0x5bc3d8, 0xc492f5, 0x4badc6, 0xa5ca4e, 0xcd37a7, 0x36a9e6,
+0x9492ab, 0x6842dd, 0xde6319, 0xef8c76, 0x528b68, 0x37dbfc,
+0xaba1ae, 0x3115df, 0xa1ae00, 0xdafb0c, 0x664d64, 0xb705ed,
+0x306529, 0xbf5657, 0x3aff47, 0xb9f96a, 0xf3be75, 0xdf9328,
+0x3080ab, 0xf68c66, 0x15cb04, 0x0622fa, 0x1de4d9, 0xa4b33d,
+0x8f1b57, 0x09cd36, 0xe9424e, 0xa4be13, 0xb52333, 0x1aaaf0,
+0xa8654f, 0xa5c1d2, 0x0f3f0b, 0xcd785b, 0x76f923, 0x048b7b,
+0x721789, 0x53a6c6, 0xe26e6f, 0x00ebef, 0x584a9b, 0xb7dac4,
+0xba66aa, 0xcfcf76, 0x1d02d1, 0x2df1b1, 0xc1998c, 0x77adc3,
+0xda4886, 0xa05df7, 0xf480c6, 0x2ff0ac, 0x9aecdd, 0xbc5c3f,
+0x6dded0, 0x1fc790, 0xb6db2a, 0x3a25a3, 0x9aaf00, 0x9353ad,
+0x0457b6, 0xb42d29, 0x7e804b, 0xa707da, 0x0eaa76, 0xa1597b,
+0x2a1216, 0x2db7dc, 0xfde5fa, 0xfedb89, 0xfdbe89, 0x6c76e4,
+0xfca906, 0x70803e, 0x156e85, 0xff87fd, 0x073e28, 0x336761,
+0x86182a, 0xeabd4d, 0xafe7b3, 0x6e6d8f, 0x396795, 0x5bbf31,
+0x48d784, 0x16df30, 0x432dc7, 0x356125, 0xce70c9, 0xb8cb30,
+0xfd6cbf, 0xa200a4, 0xe46c05, 0xa0dd5a, 0x476f21, 0xd21262,
+0x845cb9, 0x496170, 0xe0566b, 0x015299, 0x375550, 0xb7d51e,
+0xc4f133, 0x5f6e13, 0xe4305d, 0xa92e85, 0xc3b21d, 0x3632a1,
+0xa4b708, 0xd4b1ea, 0x21f716, 0xe4698f, 0x77ff27, 0x80030c,
+0x2d408d, 0xa0cd4f, 0x99a520, 0xd3a2b3, 0x0a5d2f, 0x42f9b4,
+0xcbda11, 0xd0be7d, 0xc1db9b, 0xbd17ab, 0x81a2ca, 0x5c6a08,
+0x17552e, 0x550027, 0xf0147f, 0x8607e1, 0x640b14, 0x8d4196,
+0xdebe87, 0x2afdda, 0xb6256b, 0x34897b, 0xfef305, 0x9ebfb9,
+0x4f6a68, 0xa82a4a, 0x5ac44f, 0xbcf82d, 0x985ad7, 0x95c7f4,
+0x8d4d0d, 0xa63a20, 0x5f57a4, 0xb13f14, 0x953880, 0x0120cc,
+0x86dd71, 0xb6dec9, 0xf560bf, 0x11654d, 0x6b0701, 0xacb08c,
+0xd0c0b2, 0x485551, 0x0efb1e, 0xc37295, 0x3b06a3, 0x3540c0,
+0x7bdc06, 0xcc45e0, 0xfa294e, 0xc8cad6, 0x41f3e8, 0xde647c,
+0xd8649b, 0x31bed9, 0xc397a4, 0xd45877, 0xc5e369, 0x13daf0,
+0x3c3aba, 0x461846, 0x5f7555, 0xf5bdd2, 0xc6926e, 0x5d2eac,
+0xed440e, 0x423e1c, 0x87c461, 0xe9fd29, 0xf3d6e7, 0xca7c22,
+0x35916f, 0xc5e008, 0x8dd7ff, 0xe26a6e, 0xc6fdb0, 0xc10893,
+0x745d7c, 0xb2ad6b, 0x9d6ecd, 0x7b723e, 0x6a11c6, 0xa9cff7,
+0xdf7329, 0xbac9b5, 0x5100b7, 0x0db2e2, 0x24ba74, 0x607de5,
+0x8ad874, 0x2c150d, 0x0c1881, 0x94667e, 0x162901, 0x767a9f,
+0xbefdfd, 0xef4556, 0x367ed9, 0x13d9ec, 0xb9ba8b, 0xfc97c4,
+0x27a831, 0xc36ef1, 0x36c594, 0x56a8d8, 0xb5a8b4, 0x0ecccf,
+0x2d8912, 0x34576f, 0x89562c, 0xe3ce99, 0xb920d6, 0xaa5e6b,
+0x9c2a3e, 0xcc5f11, 0x4a0bfd, 0xfbf4e1, 0x6d3b8e, 0x2c86e2,
+0x84d4e9, 0xa9b4fc, 0xd1eeef, 0xc9352e, 0x61392f, 0x442138,
+0xc8d91b, 0x0afc81, 0x6a4afb, 0xd81c2f, 0x84b453, 0x8c994e,
+0xcc2254, 0xdc552a, 0xd6c6c0, 0x96190b, 0xb8701a, 0x649569,
+0x605a26, 0xee523f, 0x0f117f, 0x11b5f4, 0xf5cbfc, 0x2dbc34,
+0xeebc34, 0xcc5de8, 0x605edd, 0x9b8e67, 0xef3392, 0xb817c9,
+0x9b5861, 0xbc57e1, 0xc68351, 0x103ed8, 0x4871dd, 0xdd1c2d,
+0xa118af, 0x462c21, 0xd7f359, 0x987ad9, 0xc0549e, 0xfa864f,
+0xfc0656, 0xae79e5, 0x362289, 0x22ad38, 0xdc9367, 0xaae855,
+0x382682, 0x9be7ca, 0xa40d51, 0xb13399, 0x0ed7a9, 0x480569,
+0xf0b265, 0xa7887f, 0x974c88, 0x36d1f9, 0xb39221, 0x4a827b,
+0x21cf98, 0xdc9f40, 0x5547dc, 0x3a74e1, 0x42eb67, 0xdf9dfe,
+0x5fd45e, 0xa4677b, 0x7aacba, 0xa2f655, 0x23882b, 0x55ba41,
+0x086e59, 0x862a21, 0x834739, 0xe6e389, 0xd49ee5, 0x40fb49,
+0xe956ff, 0xca0f1c, 0x8a59c5, 0x2bfa94, 0xc5c1d3, 0xcfc50f,
+0xae5adb, 0x86c547, 0x624385, 0x3b8621, 0x94792c, 0x876110,
+0x7b4c2a, 0x1a2c80, 0x12bf43, 0x902688, 0x893c78, 0xe4c4a8,
+0x7bdbe5, 0xc23ac4, 0xeaf426, 0x8a67f7, 0xbf920d, 0x2ba365,
+0xb1933d, 0x0b7cbd, 0xdc51a4, 0x63dd27, 0xdde169, 0x19949a,
+0x9529a8, 0x28ce68, 0xb4ed09, 0x209f44, 0xca984e, 0x638270,
+0x237c7e, 0x32b90f, 0x8ef5a7, 0xe75614, 0x08f121, 0x2a9db5,
+0x4d7e6f, 0x5119a5, 0xabf9b5, 0xd6df82, 0x61dd96, 0x023616,
+0x9f3ac4, 0xa1a283, 0x6ded72, 0x7a8d39, 0xa9b882, 0x5c326b,
+0x5b2746, 0xed3400, 0x7700d2, 0x55f4fc, 0x4d5901, 0x8071e0,
+0xe13f89, 0xb295f3, 0x64a8f1, 0xaea74b, 0x38fc4c, 0xeab2bb,
+0x47270b, 0xabc3a7, 0x34ba60, 0x52dd34, 0xf8563a, 0xeb7e8a,
+0x31bb36, 0x5895b7, 0x47f7a9, 0x94c3aa, 0xd39225, 0x1e7f3e,
+0xd8974e, 0xbba94f, 0xd8ae01, 0xe661b4, 0x393d8e, 0xa523aa,
+0x33068e, 0x1633b5, 0x3bb188, 0x1d3a9d, 0x4013d0, 0xcc1be5,
+0xf862e7, 0x3bf28f, 0x39b5bf, 0x0bc235, 0x22747e, 0xa247c0,
+0xd52d1f, 0x19add3, 0x9094df, 0x9311d0, 0xb42b25, 0x496db2,
+0xe264b2, 0x5ef135, 0x3bc6a4, 0x1a4ad0, 0xaac92e, 0x64e886,
+0x573091, 0x982cfb, 0x311b1a, 0x08728b, 0xbdcee1, 0x60e142,
+0xeb641d, 0xd0bba3, 0xe559d4, 0x597b8c, 0x2a4483, 0xf332ba,
+0xf84867, 0x2c8d1b, 0x2fa9b0, 0x50f3dd, 0xf9f573, 0xdb61b4,
+0xfe233e, 0x6c41a6, 0xeea318, 0x775a26, 0xbc5e5c, 0xcea708,
+0x94dc57, 0xe20196, 0xf1e839, 0xbe4851, 0x5d2d2f, 0x4e9555,
+0xd96ec2, 0xe7d755, 0x6304e0, 0xc02e0e, 0xfc40a0, 0xbbf9b3,
+0x7125a7, 0x222dfb, 0xf619d8, 0x838c1c, 0x6619e6, 0xb20d55,
+0xbb5137, 0x79e809, 0xaf9149, 0x0d73de, 0x0b0da5, 0xce7f58,
+0xac1934, 0x724667, 0x7a1a13, 0x9e26bc, 0x4555e7, 0x585cb5,
+0x711d14, 0x486991, 0x480d60, 0x56adab, 0xd62f64, 0x96ee0c,
+0x212ff3, 0x5d6d88, 0xa67684, 0x95651e, 0xab9e0a, 0x4ddefe,
+0x571010, 0x836a39, 0xf8ea31, 0x9e381d, 0xeac8b1, 0xcac96b,
+0x37f21e, 0xd505e9, 0x984743, 0x9fc56c, 0x0331b7, 0x3b8bf8,
+0x86e56a, 0x8dc343, 0x6230e7, 0x93cfd5, 0x6a8f2d, 0x733005,
+0x1af021, 0xa09fcb, 0x7415a1, 0xd56b23, 0x6ff725, 0x2f4bc7,
+0xb8a591, 0x7fac59, 0x5c55de, 0x212c38, 0xb13296, 0x5cff50,
+0x366262, 0xfa7b16, 0xf4d9a6, 0x2acfe7, 0xf07403, 0xd4d604,
+0x6fd916, 0x31b1bf, 0xcbb450, 0x5bd7c8, 0x0ce194, 0x6bd643,
+0x4fd91c, 0xdf4543, 0x5f3453, 0xe2b5aa, 0xc9aec8, 0x131485,
+0xf9d2bf, 0xbadb9e, 0x76f5b9, 0xaf15cf, 0xca3182, 0x14b56d,
+0xe9fe4d, 0x50fc35, 0xf5aed5, 0xa2d0c1, 0xc96057, 0x192eb6,
+0xe91d92, 0x07d144, 0xaea3c6, 0x343566, 0x26d5b4, 0x3161e2,
+0x37f1a2, 0x209eff, 0x958e23, 0x493798, 0x35f4a6, 0x4bdc02,
+0xc2be13, 0xbe80a0, 0x0b72a3, 0x115c5f, 0x1e1bd1, 0x0db4d3,
+0x869e85, 0x96976b, 0x2ac91f, 0x8a26c2, 0x3070f0, 0x041412,
+0xfc9fa5, 0xf72a38, 0x9c6878, 0xe2aa76, 0x50cfe1, 0x559274,
+0x934e38, 0x0a92f7, 0x5533f0, 0xa63db4, 0x399971, 0xe2b755,
+0xa98a7c, 0x008f19, 0xac54d2, 0x2ea0b4, 0xf5f3e0, 0x60c849,
+0xffd269, 0xae52ce, 0x7a5fdd, 0xe9ce06, 0xfb0ae8, 0xa50cce,
+0xea9d3e, 0x3766dd, 0xb834f5, 0x0da090, 0x846f88, 0x4ae3d5,
+0x099a03, 0x2eae2d, 0xfcb40a, 0xfb9b33, 0xe281dd, 0x1b16ba,
+0xd8c0af, 0xd96b97, 0xb52dc9, 0x9c277f, 0x5951d5, 0x21ccd6,
+0xb6496b, 0x584562, 0xb3baf2, 0xa1a5c4, 0x7ca2cf, 0xa9b93d,
+0x7b7b89, 0x483d38,
+};
+
+int32_t
+__ieee754_rem_pio2l (long double x, long double *y)
+{
+ double tx[3], ty[3];
+ int32_t se, j0;
+ u_int32_t i0, i1;
+ int sx;
+ int n, exp;
+
+ GET_LDOUBLE_WORDS (se, i0, i1, x);
+ sx = (se >> 15) & 1;
+ j0 = (se & 0x7fff) - 0x3fff;
+
+ if (j0 < -1)
+ {
+ /* |x| < pi/4. */
+ y[0] = x;
+ y[1] = 0;
+ return 0;
+ }
+
+ if (j0 >= 0x8000)
+ {
+ /* x is infinite or NaN. */
+ y[0] = x - x;
+ y[1] = y[0];
+ return 0;
+ }
+
+ /* Split the 64 bits of the mantissa into three 24-bit integers
+ stored in a double array. */
+ exp = j0 - 23;
+ tx[0] = (double) (i0 >> 8);
+ tx[1] = (double) (((i0 << 16) | (i1 >> 16)) & 0xffffff);
+ tx[2] = (double) ((i1 << 8) & 0xffffff);
+
+ n = __kernel_rem_pio2 (tx, ty, exp, 3, 2, two_over_pi);
+
+ /* The result is now stored in two double values, we need to convert
+ it into two long double values. */
+ if (sx == 0)
+ {
+ y[0] = (long double) ty[0] + (long double) ty[1];
+ y[1] = ty[1] - (y[0] - ty[0]);
+ return n;
+ }
+ else
+ {
+ y[0] = -((long double) ty[0] + (long double) ty[1]);
+ y[1] = -ty[1] - (y[0] + ty[0]);
+ return -n;
+ }
+}
Added: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_cosl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_cosl.c (added)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_cosl.c Sat Mar 17 00:01:51 2012
@@ -1,0 +1,123 @@
+/* Extended-precision floating point cosine on <-pi/4,pi/4>.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Based on quad-precision cosine by Jakub Jelinek <jj@xxxxxxxxxxxxxx>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_private.h>
+
+/* The polynomials have not been optimized for extended-precision and
+ may contain more terms than needed. */
+
+static const long double c[] = {
+#define ONE c[0]
+ 1.00000000000000000000000000000000000E+00L,
+
+/* cos x ~ ONE + x^2 ( SCOS1 + SCOS2 * x^2 + ... + SCOS4 * x^6 + SCOS5 * x^8 )
+ x in <0,1/256> */
+#define SCOS1 c[1]
+#define SCOS2 c[2]
+#define SCOS3 c[3]
+#define SCOS4 c[4]
+#define SCOS5 c[5]
+-5.00000000000000000000000000000000000E-01L,
+ 4.16666666666666666666666666556146073E-02L,
+-1.38888888888888888888309442601939728E-03L,
+ 2.48015873015862382987049502531095061E-05L,
+-2.75573112601362126593516899592158083E-07L,
+
+/* cos x ~ ONE + x^2 ( COS1 + COS2 * x^2 + ... + COS7 * x^12 + COS8 * x^14 )
+ x in <0,0.1484375> */
+#define COS1 c[6]
+#define COS2 c[7]
+#define COS3 c[8]
+#define COS4 c[9]
+#define COS5 c[10]
+#define COS6 c[11]
+#define COS7 c[12]
+#define COS8 c[13]
+-4.99999999999999999999999999999999759E-01L,
+ 4.16666666666666666666666666651287795E-02L,
+-1.38888888888888888888888742314300284E-03L,
+ 2.48015873015873015867694002851118210E-05L,
+-2.75573192239858811636614709689300351E-07L,
+ 2.08767569877762248667431926878073669E-09L,
+-1.14707451049343817400420280514614892E-11L,
+ 4.77810092804389587579843296923533297E-14L,
+
+/* sin x ~ ONE * x + x^3 ( SSIN1 + SSIN2 * x^2 + ... + SSIN4 * x^6 + SSIN5 * x^8 )
+ x in <0,1/256> */
+#define SSIN1 c[14]
+#define SSIN2 c[15]
+#define SSIN3 c[16]
+#define SSIN4 c[17]
+#define SSIN5 c[18]
+-1.66666666666666666666666666666666659E-01L,
+ 8.33333333333333333333333333146298442E-03L,
+-1.98412698412698412697726277416810661E-04L,
+ 2.75573192239848624174178393552189149E-06L,
+-2.50521016467996193495359189395805639E-08L,
+};
+
+#define SINCOSL_COS_HI 0
+#define SINCOSL_COS_LO 1
+#define SINCOSL_SIN_HI 2
+#define SINCOSL_SIN_LO 3
+extern const long double __sincosl_table[];
+
+long double
+__kernel_cosl(long double x, long double y)
+{
+ long double h, l, z, sin_l, cos_l_m1;
+ int index;
+
+ if (signbit (x))
+ {
+ x = -x;
+ y = -y;
+ }
+ if (x < 0.1484375L)
+ {
+ /* Argument is small enough to approximate it by a Chebyshev
+ polynomial of degree 16. */
+ if (x < 0x1p-33L)
+ if (!((int)x)) return ONE; /* generate inexact */
+ z = x * x;
+ return ONE + (z*(COS1+z*(COS2+z*(COS3+z*(COS4+
+ z*(COS5+z*(COS6+z*(COS7+z*COS8))))))));
+ }
+ else
+ {
+ /* So that we don't have to use too large polynomial, we find
+ l and h such that x = l + h, where fabsl(l) <= 1.0/256 with 83
+ possible values for h. We look up cosl(h) and sinl(h) in
+ pre-computed tables, compute cosl(l) and sinl(l) using a
+ Chebyshev polynomial of degree 10(11) and compute
+ cosl(h+l) = cosl(h)cosl(l) - sinl(h)sinl(l). */
+ index = (int) (128 * (x - (0.1484375L - 1.0L / 256.0L)));
+ h = 0.1484375L + index / 128.0;
+ index *= 4;
+ l = y - (h - x);
+ z = l * l;
+ sin_l = l*(ONE+z*(SSIN1+z*(SSIN2+z*(SSIN3+z*(SSIN4+z*SSIN5)))));
+ cos_l_m1 = z*(SCOS1+z*(SCOS2+z*(SCOS3+z*(SCOS4+z*SCOS5))));
+ return __sincosl_table [index + SINCOSL_COS_HI]
+ + (__sincosl_table [index + SINCOSL_COS_LO]
+ - (__sincosl_table [index + SINCOSL_SIN_HI] * sin_l
+ - __sincosl_table [index + SINCOSL_COS_HI] * cos_l_m1));
+ }
+}
Added: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_sinl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_sinl.c (added)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_sinl.c Sat Mar 17 00:01:51 2012
@@ -1,0 +1,126 @@
+/* Quad-precision floating point sine on <-pi/4,pi/4>.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Based on quad-precision sine by Jakub Jelinek <jj@xxxxxxxxxxxxxx>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* The polynomials have not been optimized for extended-precision and
+ may contain more terms than needed. */
+
+#include <math.h>
+#include <math_private.h>
+
+/* The polynomials have not been optimized for extended-precision and
+ may contain more terms than needed. */
+
+static const long double c[] = {
+#define ONE c[0]
+ 1.00000000000000000000000000000000000E+00L,
+
+/* cos x ~ ONE + x^2 ( SCOS1 + SCOS2 * x^2 + ... + SCOS4 * x^6 + SCOS5 * x^8 )
+ x in <0,1/256> */
+#define SCOS1 c[1]
+#define SCOS2 c[2]
+#define SCOS3 c[3]
+#define SCOS4 c[4]
+#define SCOS5 c[5]
+-5.00000000000000000000000000000000000E-01L,
+ 4.16666666666666666666666666556146073E-02L,
+-1.38888888888888888888309442601939728E-03L,
+ 2.48015873015862382987049502531095061E-05L,
+-2.75573112601362126593516899592158083E-07L,
+
+/* sin x ~ ONE * x + x^3 ( SIN1 + SIN2 * x^2 + ... + SIN7 * x^12 + SIN8 * x^14 )
+ x in <0,0.1484375> */
+#define SIN1 c[6]
+#define SIN2 c[7]
+#define SIN3 c[8]
+#define SIN4 c[9]
+#define SIN5 c[10]
+#define SIN6 c[11]
+#define SIN7 c[12]
+#define SIN8 c[13]
+-1.66666666666666666666666666666666538e-01L,
+ 8.33333333333333333333333333307532934e-03L,
+-1.98412698412698412698412534478712057e-04L,
+ 2.75573192239858906520896496653095890e-06L,
+-2.50521083854417116999224301266655662e-08L,
+ 1.60590438367608957516841576404938118e-10L,
+-7.64716343504264506714019494041582610e-13L,
+ 2.81068754939739570236322404393398135e-15L,
+
+/* sin x ~ ONE * x + x^3 ( SSIN1 + SSIN2 * x^2 + ... + SSIN4 * x^6 + SSIN5 * x^8 )
+ x in <0,1/256> */
+#define SSIN1 c[14]
+#define SSIN2 c[15]
+#define SSIN3 c[16]
+#define SSIN4 c[17]
+#define SSIN5 c[18]
+-1.66666666666666666666666666666666659E-01L,
+ 8.33333333333333333333333333146298442E-03L,
+-1.98412698412698412697726277416810661E-04L,
+ 2.75573192239848624174178393552189149E-06L,
+-2.50521016467996193495359189395805639E-08L,
+};
+
+#define SINCOSL_COS_HI 0
+#define SINCOSL_COS_LO 1
+#define SINCOSL_SIN_HI 2
+#define SINCOSL_SIN_LO 3
+extern const long double __sincosl_table[];
+
+long double
+__kernel_sinl(long double x, long double y, int iy)
+{
+ long double absx, h, l, z, sin_l, cos_l_m1;
+ int index;
+
+ absx = fabsl (x);
+ if (absx < 0.1484375L)
+ {
+ /* Argument is small enough to approximate it by a Chebyshev
+ polynomial of degree 17. */
+ if (absx < 0x1p-33L)
+ if (!((int)x)) return x; /* generate inexact */
+ z = x * x;
+ return x + (x * (z*(SIN1+z*(SIN2+z*(SIN3+z*(SIN4+
+ z*(SIN5+z*(SIN6+z*(SIN7+z*SIN8)))))))));
+ }
+ else
+ {
+ /* So that we don't have to use too large polynomial, we find
+ l and h such that x = l + h, where fabsl(l) <= 1.0/256 with 83
+ possible values for h. We look up cosl(h) and sinl(h) in
+ pre-computed tables, compute cosl(l) and sinl(l) using a
+ Chebyshev polynomial of degree 10(11) and compute
+ sinl(h+l) = sinl(h)cosl(l) + cosl(h)sinl(l). */
+ index = (int) (128 * (absx - (0.1484375L - 1.0L / 256.0L)));
+ h = 0.1484375L + index / 128.0;
+ index *= 4;
+ if (iy)
+ l = (x < 0 ? -y : y) - (h - absx);
+ else
+ l = absx - h;
+ z = l * l;
+ sin_l = l*(ONE+z*(SSIN1+z*(SSIN2+z*(SSIN3+z*(SSIN4+z*SSIN5)))));
+ cos_l_m1 = z*(SCOS1+z*(SCOS2+z*(SCOS3+z*(SCOS4+z*SCOS5))));
+ z = __sincosl_table [index + SINCOSL_SIN_HI]
+ + (__sincosl_table [index + SINCOSL_SIN_LO]
+ + (__sincosl_table [index + SINCOSL_SIN_HI] * cos_l_m1)
+ + (__sincosl_table [index + SINCOSL_COS_HI] * sin_l));
+ return (x < 0) ? -z : z;
+ }
+}
Added: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_tanl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_tanl.c (added)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/k_tanl.c Sat Mar 17 00:01:51 2012
@@ -1,0 +1,137 @@
+/*
+ * ====================================================
+ * 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.
+ * ====================================================
+ */
+
+/*
+ Long double expansions are
+ Copyright (C) 2001 Stephen L. Moshier <moshier@xxxxxxxxxxxxxxx>
+ and are incorporated herein by permission of the author. The author
+ reserves the right to distribute this material elsewhere under different
+ copying permissions. These modifications are distributed here under
+ the following terms:
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* __kernel_tanl( x, y, k )
+ * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854
+ * Input x is assumed to be bounded by ~pi/4 in magnitude.
+ * Input y is the tail of x.
+ * Input k indicates whether tan (if k=1) or
+ * -1/tan (if k= -1) is returned.
+ *
+ * Algorithm
+ * 1. Since tan(-x) = -tan(x), we need only to consider positive x.
+ * 2. if x < 2^-33, return x with inexact if x!=0.
+ * 3. tan(x) is approximated by a rational form x + x^3 / 3 + x^5 R(x^2)
+ * on [0,0.67433].
+ *
+ * Note: tan(x+y) = tan(x) + tan'(x)*y
+ * ~ tan(x) + (1+x*x)*y
+ * Therefore, for better accuracy in computing tan(x+y), let
+ * r = x^3 * R(x^2)
+ * then
+ * tan(x+y) = x + (x^3 / 3 + (x^2 *(r+y)+y))
+ *
+ * 4. For x in [0.67433,pi/4], let y = pi/4 - x, then
+ * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y))
+ * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))
+ */
+
+#include <math.h>
+#include <math_private.h>
+static const long double
+ one = 1.0L,
+ pio4hi = 0xc.90fdaa22168c235p-4L,
+ pio4lo = -0x3.b399d747f23e32ecp-68L,
+
+ /* tan x = x + x^3 / 3 + x^5 T(x^2)/U(x^2)
+ 0 <= x <= 0.6743316650390625
+ Peak relative error 8.0e-36 */
+ TH = 3.333333333333333333333333333333333333333E-1L,
+ T0 = -1.813014711743583437742363284336855889393E7L,
+ T1 = 1.320767960008972224312740075083259247618E6L,
+ T2 = -2.626775478255838182468651821863299023956E4L,
+ T3 = 1.764573356488504935415411383687150199315E2L,
+ T4 = -3.333267763822178690794678978979803526092E-1L,
+
+ U0 = -1.359761033807687578306772463253710042010E8L,
+ U1 = 6.494370630656893175666729313065113194784E7L,
+ U2 = -4.180787672237927475505536849168729386782E6L,
+ U3 = 8.031643765106170040139966622980914621521E4L,
+ U4 = -5.323131271912475695157127875560667378597E2L;
+ /* 1.000000000000000000000000000000000000000E0 */
+
+
+long double
+__kernel_tanl (long double x, long double y, int iy)
+{
+ long double z, r, v, w, s;
+ long double absx = fabsl (x);
+ int sign;
+
+ if (absx < 0x1p-33)
+ {
+ if ((int) x == 0)
+ { /* generate inexact */
+ if (x == 0 && iy == -1)
+ return one / fabsl (x);
+ else
+ return (iy == 1) ? x : -one / x;
+ }
+ }
+ if (absx >= 0.6743316650390625L)
+ {
+ if (signbit (x))
+ {
+ x = -x;
+ y = -y;
+ sign = -1;
+ }
+ else
+ sign = 1;
+ z = pio4hi - x;
+ w = pio4lo - y;
+ x = z + w;
+ y = 0.0;
+ }
+ z = x * x;
+ r = T0 + z * (T1 + z * (T2 + z * (T3 + z * T4)));
+ v = U0 + z * (U1 + z * (U2 + z * (U3 + z * (U4 + z))));
+ r = r / v;
+
+ s = z * x;
+ r = y + z * (s * r + y);
+ r += TH * s;
+ w = x + r;
+ if (absx >= 0.6743316650390625L)
+ {
+ v = (long double) iy;
+ w = (v - 2.0 * (x - (w * w / (w + v) - r)));
+ if (sign < 0)
+ w = -w;
+ return w;
+ }
+ if (iy == 1)
+ return w;
+ else
+ return -1.0 / (x + r);
+}
Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_cosl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_cosl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_cosl.c Sat Mar 17 00:01:51 2012
@@ -68,7 +68,7 @@
/* cos(Inf or NaN) is NaN */
else if (se==0x7fff) {
- if ((i0 | i1) == 0)
+ if (i1 == 0 && i0 == 0x80000000)
__set_errno (EDOM);
return x-x;
}
Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_sinl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_sinl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_sinl.c Sat Mar 17 00:01:51 2012
@@ -68,7 +68,7 @@
/* sin(Inf or NaN) is NaN */
else if (se==0x7fff) {
- if ((i0 | i1) == 0)
+ if (i1 == 0 && i0 == 0x80000000)
__set_errno (EDOM);
return x-x;
}
Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_tanl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_tanl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_tanl.c Sat Mar 17 00:01:51 2012
@@ -48,23 +48,28 @@
* TRIG(x) returns trig(x) nearly rounded
*/
+#include <errno.h>
#include <math.h>
#include <math_private.h>
long double __tanl(long double x)
{
long double y[2],z=0.0;
- int32_t n, se;
+ int32_t n, se, i0, i1;
/* High word of x. */
- GET_LDOUBLE_EXP(se,x);
+ GET_LDOUBLE_WORDS(se,i0,i1,x);
/* |x| ~< pi/4 */
se &= 0x7fff;
if(se <= 0x3ffe) return __kernel_tanl(x,z,1);
/* tan(Inf or NaN) is NaN */
- else if (se==0x7fff) return x-x; /* NaN */
+ else if (se==0x7fff) {
+ if (i1 == 0 && i0 == 0x80000000)
+ __set_errno (EDOM);
+ return x-x;
+ }
/* argument reduction needed */
else {
Added: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/t_sincosl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/t_sincosl.c (added)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/t_sincosl.c Sat Mar 17 00:01:51 2012
@@ -1,0 +1,483 @@
+/* Extended-precision floating point sine and cosine tables.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Based on quad-precision tables by Jakub Jelinek <jj@xxxxxxxxxxxxxx>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* For 0.1484375 + n/128.0, n=0..82 this table contains
+ first 64 bits of cosine, then at least 64 additional
+ bits and the same for sine.
+ 0.1484375+82.0/128.0 is the smallest number among above defined numbers
+ larger than pi/4.
+ Computed using MPFR:
+
+ #include <stdio.h>
+ #include <mpfr.h>
+
+ int
+ main (void)
+ {
+ int j;
+ mpfr_t t, b, i, rs, rc, ts, tc, tsl, tcl;
+ mpfr_init2 (b, 64);
+ mpfr_init2 (i, 64);
+ mpfr_init2 (t, 64);
+ mpfr_set_str (b, "0.1484375", 0, MPFR_RNDN);
+ mpfr_set_str (i, "0x1p-7", 0, MPFR_RNDN);
+ mpfr_init2 (rs, 300);
+ mpfr_init2 (rc, 300);
+ mpfr_init2 (ts, 64);
+ mpfr_init2 (tc, 64);
+ mpfr_init2 (tsl, 64);
+ mpfr_init2 (tcl, 64);
+ for (j = 0; j <= 82; j++)
+ {
+ mpfr_mul_ui (t, i, j, MPFR_RNDN);
+ mpfr_add (t, t, b, MPFR_RNDN);
+ printf (" /" "* x = 0.1484375 + %d/128. *" "/\n", j);
+ mpfr_cos (rc, t, MPFR_RNDN);
+ mpfr_sin (rs, t, MPFR_RNDN);
+ mpfr_set (tc, rc, MPFR_RNDN);
+ mpfr_set (ts, rs, MPFR_RNDN);
+ mpfr_sub (tcl, rc, tc, MPFR_RNDN);
+ mpfr_sub (tsl, rs, ts, MPFR_RNDN);
+ mpfr_printf (" %.17RaL,\n", tc);
+ mpfr_printf (" %.17RaL,\n", tcl);
+ mpfr_printf (" %.17RaL,\n", ts);
+ mpfr_printf (" %.17RaL,\n", tsl);
+ }
+ return 0;
+ }
+
+*/
+
+const long double __sincosl_table[] = {
+ /* x = 0.1484375 + 0/128. */
+ 0xf.d2f5320e1b7902100p-4L,
+ -0x6.4b225d06708635580p-68L,
+ 0x2.5dc50bc95711d0d80p-4L,
+ 0x1.787d108fd438cf5a0p-68L,
+ /* x = 0.1484375 + 1/128. */
+ 0xf.ce1a053e621438b00p-4L,
+ 0x6.d60c76e8c45bf0a80p-68L,
+ 0x2.7d66258bacd96a400p-4L,
+ -0x1.4cca4c9a3782a6bc0p-68L,
+ /* x = 0.1484375 + 2/128. */
+ 0xf.c8ffa01ba68074100p-4L,
+ 0x7.e05962b0d9fdf2000p-68L,
+ 0x2.9cfd49b8be4f66540p-4L,
+ -0x1.89354fe340fbd96c0p-68L,
+ /* x = 0.1484375 + 3/128. */
+ 0xf.c3a6170f767ac7300p-4L,
+ 0x5.d63d99a9d439e1d80p-68L,
+ 0x2.bc89f9f424de54840p-4L,
+ 0x1.de7ce03b2514952c0p-68L,
+ /* x = 0.1484375 + 4/128. */
+ 0xf.be0d7f7fef11e7100p-4L,
+ -0x5.5bc47540b095ba800p-68L,
+ 0x2.dc0bb80b49a97ffc0p-4L,
+ -0xc.b1722e07246208500p-72L,
+ /* x = 0.1484375 + 5/128. */
+ 0xf.b835efcf670dd2d00p-4L,
+ -0x1.90186db968115ec20p-68L,
+ 0x2.fb8205f75e56a2b40p-4L,
+ 0x1.6a1c4792f85625880p-68L,
+ /* x = 0.1484375 + 6/128. */
+ 0xf.b21f7f5c156696b00p-4L,
+ 0xa.c1fe28ac5fd766700p-76L,
+ 0x3.1aec65df552876f80p-4L,
+ 0x2.ece9a235671324700p-72L,
+ /* x = 0.1484375 + 7/128. */
+ 0xf.abca467fb3cb8f200p-4L,
+ -0x2.f960fe2715cc521c0p-68L,
+ 0x3.3a4a5a19d86246700p-4L,
+ 0x1.0f602c44df4fa5140p-68L,
+ /* x = 0.1484375 + 8/128. */
+ 0xf.a5365e8f1d3ca2800p-4L,
+ -0x4.1e24a289519b26800p-68L,
+ 0x3.599b652f40ec999c0p-4L,
+ 0x1.f12a0a4c8561de160p-68L,
+ /* x = 0.1484375 + 9/128. */
+ 0xf.9e63e1d9e8b6f6f00p-4L,
+ 0x2.e296bae5b5ed9c100p-68L,
+ 0x3.78df09db8c332ce00p-4L,
+ 0xd.2b53d865582e45200p-72L,
+ /* x = 0.1484375 + 10/128. */
+ 0xf.9752eba9fff6b9900p-4L,
+ -0x7.bd415254fab56cd00p-68L,
+ 0x3.9814cb10513453cc0p-4L,
+ -0x6.84de43e3595cc8500p-72L,
+ /* x = 0.1484375 + 11/128. */
+ 0xf.90039843324f9b900p-4L,
+ 0x4.0416c1984b6cbed00p-68L,
+ 0x3.b73c2bf6b4b9f6680p-4L,
+ 0xe.f9499c81f0d965100p-72L,
+ /* x = 0.1484375 + 12/128. */
+ 0xf.887604e2c39dbb200p-4L,
+ 0xe.4ec5825059a78a000p-72L,
+ 0x3.d654aff15cb457a00p-4L,
+ 0xf.ca854698aba330400p-72L,
+ /* x = 0.1484375 + 13/128. */
+ 0xf.80aa4fbef750ba800p-4L,
+ -0x7.c2cc346a06b075c00p-68L,
+ 0x3.f55dda9e62aed7500p-4L,
+ 0x1.3bd7b8e6a3d1635e0p-68L,
+ /* x = 0.1484375 + 14/128. */
+ 0xf.78a098069792dab00p-4L,
+ -0x4.3611bda6e483a5980p-68L,
+ 0x4.14572fd94556e6480p-4L,
+ -0xc.29dfd8ec7722b8400p-72L,
+ /* x = 0.1484375 + 15/128. */
+ 0xf.7058fde0788dfc800p-4L,
+ 0x5.b8fe88789e4f42500p-72L,
+ 0x4.334033bcd90d66080p-4L,
+ -0x3.0a0c93e2b47bbae40p-68L,
+ /* x = 0.1484375 + 16/128. */
+ 0xf.67d3a26af7d07aa00p-4L,
+ 0x4.bd6d42af8c0068000p-68L,
+ 0x4.52186aa5377ab2080p-4L,
+ 0x3.bf2524f52e3a06a80p-68L,
+ /* x = 0.1484375 + 17/128. */
+ 0xf.5f10a7bb77d3dfa00p-4L,
+ 0xc.1da8b578427832800p-72L,
+ 0x4.70df5931ae1d94600p-4L,
+ 0x7.6fe0dcff47fe31b80p-72L,
+ /* x = 0.1484375 + 18/128. */
+ 0xf.561030ddd7a789600p-4L,
+ 0xe.a9f4a32c652155500p-72L,
+ 0x4.8f948446abcd6b100p-4L,
+ -0x8.0334eff185e4d9100p-72L,
+ /* x = 0.1484375 + 19/128. */
+ 0xf.4cd261d3e6c15bb00p-4L,
+ 0x3.69c8758630d2ac000p-68L,
+ 0x4.ae37710fad27c8a80p-4L,
+ 0x2.9c4cf96c03519b9c0p-68L,
+ /* x = 0.1484375 + 20/128. */
+ 0xf.43575f94d4f6b2700p-4L,
+ 0x2.f5fb76b14d2a64ac0p-68L,
+ 0x4.ccc7a50127e1de100p-4L,
+ -0x3.494bf3cfd39ae0840p-68L,
+ /* x = 0.1484375 + 21/128. */
+ 0xf.399f500c9e9fd3800p-4L,
+ -0x5.166a8d9c254778900p-68L,
+ 0x4.eb44a5da74f600200p-4L,
+ 0x7.aaa090f0734e28880p-72L,
+ /* x = 0.1484375 + 22/128. */
+ 0xf.2faa5a1b74e82fd00p-4L,
+ 0x6.1fa05f9177380e900p-68L,
+ 0x5.09adf9a7b9a5a0f80p-4L,
+ -0x1.c75705c59f5e66be0p-68L,
+ /* x = 0.1484375 + 23/128. */
+ 0xf.2578a595224dd2e00p-4L,
+ 0x6.bfa2eb2f99cc67500p-68L,
+ 0x5.280326c3cf4818200p-4L,
+ 0x3.ba6bb08eac82c2080p-68L,
+ /* x = 0.1484375 + 24/128. */
+ 0xf.1b0a5b406b526d900p-4L,
+ -0x7.93aa0152372f23380p-68L,
+ 0x5.4643b3da29de9b380p-4L,
+ -0x2.8eaa110f0ccd04c00p-68L,
+ /* x = 0.1484375 + 25/128. */
+ 0xf.105fa4d66b607a600p-4L,
+ 0x7.d44e0427252044380p-68L,
+ 0x5.646f27e8bd65cbe00p-4L,
+ 0x3.a5d61ff0657229100p-68L,
+ /* x = 0.1484375 + 26/128. */
+ 0xf.0578ad01ede708000p-4L,
+ -0x5.c63f6239467b50100p-68L,
+ 0x5.82850a41e1dd46c80p-4L,
+ -0x9.fd15dbb3244403200p-76L,
+ /* x = 0.1484375 + 27/128. */
+ 0xe.fa559f5ec3aec3a00p-4L,
+ 0x4.eb03319278a2d4200p-68L,
+ 0x5.a084e28e35fda2780p-4L,
+ -0x9.202444aace28b3100p-72L,
+ /* x = 0.1484375 + 28/128. */
+ 0xe.eef6a879146af0c00p-4L,
+ -0x6.46a15d15f53f2c200p-72L,
+ 0x5.be6e38ce809554280p-4L,
+ 0x3.c14ee9da0d3648400p-68L,
+ /* x = 0.1484375 + 29/128. */
+ 0xe.e35bf5ccac8905300p-4L,
+ -0x3.26e2248cb2c5b81c0p-68L,
+ 0x5.dc40955d9084f4880p-4L,
+ 0x2.94675a2498de5d840p-68L,
+ /* x = 0.1484375 + 30/128. */
+ 0xe.d785b5c44741b4500p-4L,
+ -0x6.c3a943462cc75eb00p-68L,
+ 0x5.f9fb80f21b5364a00p-4L,
+ -0x3.bcdabf5af1dd3ad00p-68L,
+ /* x = 0.1484375 + 31/128. */
+ 0xe.cb7417b8d4ee3ff00p-4L,
+ -0x3.c8545bf8c55b70e00p-68L,
+ 0x6.179e84a09a5258a80p-4L,
+ -0x3.f164a0531fc1ada00p-68L,
+ /* x = 0.1484375 + 32/128. */
+ 0xe.bf274bf0bda4f6200p-4L,
+ 0x4.47e56a09362679900p-68L,
+ 0x6.352929dd264bd4480p-4L,
+ 0x2.02ea766325d8aa8c0p-68L,
+ /* x = 0.1484375 + 33/128. */
+ 0xe.b29f839f201fd1400p-4L,
+ -0x4.6c8697d86e9587100p-68L,
+ 0x6.529afa7d51b129600p-4L,
+ 0x3.1ec197c0a840a11c0p-68L,
+ /* x = 0.1484375 + 34/128. */
+ 0xe.a5dcf0e30cf03e700p-4L,
+ -0x6.8910f4e13d9aea080p-68L,
+ 0x6.6ff380ba014410a00p-4L,
+ -0x1.c65cdf4f5c05a02a0p-68L,
+ /* x = 0.1484375 + 35/128. */
+ 0xe.98dfc6c6be031e600p-4L,
+ 0xd.d3089cbdd18a75b00p-72L,
+ 0x6.8d324731433279700p-4L,
+ 0x3.bc712bcc4ccddc480p-68L,
+ /* x = 0.1484375 + 36/128. */
+ 0xe.8ba8393eca7821b00p-4L,
+ -0x5.a9c27cb6e49efee80p-68L,
+ 0x6.aa56d8e8249db4e80p-4L,
+ 0x3.60a761fe3f9e559c0p-68L,
+ /* x = 0.1484375 + 37/128. */
+ 0xe.7e367d2956cfb1700p-4L,
+ -0x4.955ee1abe632ffa80p-68L,
+ 0x6.c760c14c8585a5200p-4L,
+ -0x2.42cb99f5193ad5380p-68L,
+ /* x = 0.1484375 + 38/128. */
+ 0xe.708ac84d4172a3e00p-4L,
+ 0x2.737662213429e1400p-68L,
+ 0x6.e44f8c36eb10a1c80p-4L,
+ -0xa.d2f6c3ff0b2b84600p-72L,
+ /* x = 0.1484375 + 39/128. */
+ 0xe.62a551594b970a700p-4L,
+ 0x7.0b15d41d4c0e48400p-68L,
+ 0x7.0122c5ec5028c8d00p-4L,
+ -0xc.c540b02cbf333c800p-76L,
+ /* x = 0.1484375 + 40/128. */
+ 0xe.54864fe33e8575d00p-4L,
+ -0x5.40a42f1a30e4e5780p-68L,
+ 0x7.1dd9fb1ff46778500p-4L,
+ 0x3.acb970a9f6729c700p-68L,
+ /* x = 0.1484375 + 41/128. */
+ 0xe.462dfc670d421ab00p-4L,
+ 0x3.d1a15901228f146c0p-68L,
+ 0x7.3a74b8f52947b6800p-4L,
+ 0x1.baf6928eb3fb02180p-68L,
+ /* x = 0.1484375 + 42/128. */
+ 0xe.379c9045f29d51800p-4L,
+ -0x3.b7f755b683dfa84c0p-68L,
+ 0x7.56f28d011d9852880p-4L,
+ 0x2.44a75fc29c779bd80p-68L,
+ /* x = 0.1484375 + 43/128. */
+ 0xe.28d245c58baef7200p-4L,
+ 0x2.25e232abc003c4380p-68L,
+ 0x7.7353054ca72690d80p-4L,
+ -0x3.391e8e0266194c600p-68L,
+ /* x = 0.1484375 + 44/128. */
+ 0xe.19cf580eeec046b00p-4L,
+ -0x5.ebdd058b7f8131080p-68L,
+ 0x7.8f95b0560a9a3bd80p-4L,
+ -0x1.2084267e23c739ee0p-68L,
+ /* x = 0.1484375 + 45/128. */
+ 0xe.0a94032dbea7cee00p-4L,
+ -0x4.222625d0505267a80p-68L,
+ 0x7.abba1d12c17bfa200p-4L,
+ -0x2.6d0f26c09f2126680p-68L,
+ /* x = 0.1484375 + 46/128. */
+ 0xd.fb20840f3a9b36f00p-4L,
+ 0x7.ae2c515342890b600p-68L,
+ 0x7.c7bfdaf13e5ed1700p-4L,
+ 0x2.12f8a7525bfb113c0p-68L,
+ /* x = 0.1484375 + 47/128. */
+ 0xd.eb7518814a7a93200p-4L,
+ -0x4.433773ef632be3b00p-68L,
+ 0x7.e3a679daaf25c6780p-4L,
+ -0x1.abd434bfd72f69be0p-68L,
+ /* x = 0.1484375 + 48/128. */
+ 0xd.db91ff31879917300p-4L,
+ -0x4.2dbad2f5c7760ae80p-68L,
[... 3848 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits