aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/libm-i387/e_atanhl.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-12-30 01:47:46 +0000
committerUlrich Drepper <drepper@redhat.com>1996-12-30 01:47:46 +0000
commitd38cd08ca397c59fc98dba8c4d0b4bd96c899c9e (patch)
tree46ffb93f070ec805f4288ef6cdb379ba0e6ae621 /sysdeps/libm-i387/e_atanhl.S
parent01c901a56b165e57a17db349cc110f84f1b839c7 (diff)
downloadglibc-d38cd08ca397c59fc98dba8c4d0b4bd96c899c9e.tar
glibc-d38cd08ca397c59fc98dba8c4d0b4bd96c899c9e.tar.gz
glibc-d38cd08ca397c59fc98dba8c4d0b4bd96c899c9e.tar.bz2
glibc-d38cd08ca397c59fc98dba8c4d0b4bd96c899c9e.zip
Mon Dec 30 01:32:59 1996 Ulrich Drepper <drepper@cygnus.com> * tme/localtime.c: Rewrite so that localtime_r does not call tzset, but localtime does. * features.h: Rename ANSI C to ISO C. Mention __GLIBC__ and __GLIBC_MINOR__ macros. * gnu-versions.h: Add _GNU_GETOPT_INTERFACE_VERSION. * posix/getopt.c: Use _GNU_GETOPT_INTERFACE_VERSION to check whether we can elide the code. * posix/getopt1.c: Likewise. * posix/Makefile: Correct copyright. * elf/dl-error.c (_dl_catch_error): Clear `catch' also when error occurred. * elf/dl-support.c (_dl_sysdep_open_zero_fill): Don't define if MAP_ANON is defined. * elf/eval.c: Use __getline instead of getline. * elf/rtld.c (dl_main): Check return value of _dl_new_object function for NULL. * sysdeps/generic/dl-cache.c: Update copyright. * signal/Makefile: Correct copyright. (routines): Remove gsignal and ssignal. Add bsd_signal. * signal/gsignal.c: Removed. Now is made an alias. * signal/ssignal.c: Likewise. * sysdeps/posix/raise.c: Add alias gsignal. * sysdeps/stub/raise.c: Likewise. * sysdeps/posix/signal.c: Add alias ssignal. * sysdeps/stub/signal.c: Likewise. * signal/signal.h: Declare bsd_signal. Define signal as bsd_signal if __FAVOR_BSD. * sysdeps/posix/bsd_signal.c: New file. Implementation of XPG function. * sysdeps/unix/sysv/linux/signal.c: Add explanation. * socket/sys/un.h: Define SUN_LEN according to POSIX.1g. * stdio-common/Makefile (tests): Add scanf10. * stdio-common/scanf10.c: New file. * stdio-common/vfscanf.c: Decrement counter if EOF is read while reading string. * sysdeps/libm-i387/e_acos.S: Use END, not PSEUDO_END. * sysdeps/libm-i387/e_acosl.S: Likewise. * sysdeps/libm-i387/e_asin.S: Likewise. * sysdeps/libm-i387/e_asinl.S: Likewise. * sysdeps/libm-i387/e_atan2.S: Likewise. * sysdeps/libm-i387/e_atan2f.S: Likewise. * sysdeps/libm-i387/e_atan2l.S: Likewise. * sysdeps/libm-i387/e_exp.S: Likewise. * sysdeps/libm-i387/e_expl.S: Likewise. * sysdeps/libm-i387/e_fmod.S: Likewise. * sysdeps/libm-i387/e_fmodl.S: Likewise. * sysdeps/libm-i387/e_log.S: Likewise. * sysdeps/libm-i387/e_log10.S: Likewise. * sysdeps/libm-i387/e_log10l.S: Likewise. * sysdeps/libm-i387/e_logl.S: Likewise. * sysdeps/libm-i387/e_remainder.S: Likewise. * sysdeps/libm-i387/e_remainderf.S: Likewise. * sysdeps/libm-i387/e_remainderl.S: Likewise. * sysdeps/libm-i387/e_scalb.S: Likewise. * sysdeps/libm-i387/e_scalbl.S: Likewise. * sysdeps/libm-i387/e_sqrt.S: Likewise. * sysdeps/libm-i387/e_sqrtf.S: Likewise. * sysdeps/libm-i387/e_sqrtl.S: Likewise. * sysdeps/libm-i387/s_atan.S: Likewise. * sysdeps/libm-i387/s_atanf.S: Likewise. * sysdeps/libm-i387/s_atanl.S: Likewise. * sysdeps/libm-i387/s_ceil.S: Likewise. * sysdeps/libm-i387/s_ceilf.S: Likewise. * sysdeps/libm-i387/s_ceill.S: Likewise. * sysdeps/libm-i387/s_copysign.S: Likewise. * sysdeps/libm-i387/s_copysignf.S: Likewise. * sysdeps/libm-i387/s_copysignl.S: Likewise. * sysdeps/libm-i387/s_cos.S: Likewise. * sysdeps/libm-i387/s_cosf.S: Likewise. * sysdeps/libm-i387/s_cosl.S: Likewise. * sysdeps/libm-i387/s_finite.S: Likewise. * sysdeps/libm-i387/s_finitef.S: Likewise. * sysdeps/libm-i387/s_finitel.S: Likewise. * sysdeps/libm-i387/s_floor.S: Likewise. * sysdeps/libm-i387/s_floorf.S: Likewise. * sysdeps/libm-i387/s_floorl.S: Likewise. * sysdeps/libm-i387/s_ilogb.S: Likewise. * sysdeps/libm-i387/s_ilogbf.S: Likewise. * sysdeps/libm-i387/s_ilogbl.S: Likewise. * sysdeps/libm-i387/s_log1p.S: Likewise. * sysdeps/libm-i387/s_log1pf.S: Likewise. * sysdeps/libm-i387/s_log1pl.S: Likewise. * sysdeps/libm-i387/s_logb.S: Likewise. * sysdeps/libm-i387/s_logbf.S: Likewise. * sysdeps/libm-i387/s_logbl.S: Likewise. * sysdeps/libm-i387/s_rint.S: Likewise. * sysdeps/libm-i387/s_rintf.S: Likewise. * sysdeps/libm-i387/s_rintl.S: Likewise. * sysdeps/libm-i387/s_scalbn.S: Likewise. * sysdeps/libm-i387/s_scalbnf.S: Likewise. * sysdeps/libm-i387/s_scalbnl.S: Likewise. * sysdeps/libm-i387/s_significand.S: Likewise. * sysdeps/libm-i387/s_significandf.S: Likewise. * sysdeps/libm-i387/s_significandl.S: Likewise. * sysdeps/libm-i387/s_sin.S: Likewise. * sysdeps/libm-i387/s_sinf.S: Likewise. * sysdeps/libm-i387/s_sinl.S: Likewise. * sysdeps/libm-i387/e_log.S: Use fyl2xp1 instruction for values near 1 to increase precision. * sysdeps/libm-i387/e_log10.S: Likewise. * sysdeps/libm-i387/e_log10l.S: Likewise. * sysdeps/libm-i387/e_logl.S: Likewise. * sysdeps/libm-i387/s_cos.S: Use testl instead of andw. * sysdeps/libm-i387/s_cosl.S: Likewise. * sysdeps/libm-i387/s_sin.S: Likewise. * sysdeps/libm-i387/s_sinl.S: Likewise. * sysdeps/libm-i387/s_tan.S: Likewise. * sysdeps/libm-i387/s_tanl.S: Likewise. * sysdeps/libm-i387/e_acosf.S: New file. Add float versions. * sysdeps/libm-i387/e_asinf.S: Likewise. * sysdeps/libm-i387/e_expf.S: Likewise. * sysdeps/libm-i387/e_fmodf.S: Likewise. * sysdeps/libm-i387/e_log10f.S: Likewise. * sysdeps/libm-i387/e_logf.S: Likewise. * sysdeps/libm-i387/e_scalbf.S: Likewise. * sysdeps/libm-i387/e_acosh.S: New file. Highly optimized versions. * sysdeps/libm-i387/e_acoshf.S: Likewise. * sysdeps/libm-i387/e_acoshl.S: Likewise. * sysdeps/libm-i387/e_atanh.S: Likewise. * sysdeps/libm-i387/e_atanhf.S: Likewise. * sysdeps/libm-i387/e_atanhl.S: Likewise. * sysdeps/libm-i387/e_asinh.S: Likewise. * sysdeps/libm-i387/e_asinhf.S: Likewise. * sysdeps/libm-i387/e_asinhl.S: Likewise. * sysdeps/libm-ieee754/s_asinhf.c: Tweak a bit. Use lower levels for simplified handling. * sysdeps/unix/sysv/linux/syscalls.list: Add query_module. Sun Dec 22 01:39:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * inet/rcmd.c (rcmd): Set h_errno before calling herror. * inet/rexec.c (rexec): Likewise. Sat Dec 21 21:47:08 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/m68k/setjmp.c (__setjmp): Make it really compatible. Sun Dec 22 03:23:33 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-i387/s_log1p.S: Use fyl2xp1 for numbers in range -0.29 <= x <= 0.29, otherwise the old method. * sysdeps/libm-i387/s_log1pf.S: Likewise. * sysdeps/libm-i387/s_log1pl.S: Likewise.
Diffstat (limited to 'sysdeps/libm-i387/e_atanhl.S')
-rw-r--r--sysdeps/libm-i387/e_atanhl.S108
1 files changed, 108 insertions, 0 deletions
diff --git a/sysdeps/libm-i387/e_atanhl.S b/sysdeps/libm-i387/e_atanhl.S
new file mode 100644
index 0000000000..8a2bd11ce4
--- /dev/null
+++ b/sysdeps/libm-i387/e_atanhl.S
@@ -0,0 +1,108 @@
+/* ix87 specific implementation of arctanh function.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <machine/asm.h>
+
+#ifdef __ELF__
+ .section .rodata
+#else
+ .text
+#endif
+
+ .align ALIGNARG(4)
+ /* Please note that we use double values for 0.5 and 1.0. These
+ numbers have exact representations and so we don't get accuracy
+ problems. The advantage is that the code is simpler. */
+ ASM_TYPE_DIRECTIVE(half,@object)
+half: .double 0.5
+ ASM_SIZE_DIRECTIVE(half)
+ ASM_TYPE_DIRECTIVE(one,@object)
+one: .double 1.0
+ ASM_SIZE_DIRECTIVE(one)
+ /* It is not important that this constant is precise. It is only
+ a value which is known to be on the safe side for using the
+ fyl2xp1 instruction. */
+ ASM_TYPE_DIRECTIVE(limit,@object)
+limit: .double 0.29
+ ASM_SIZE_DIRECTIVE(limit)
+ .align ALIGNARG(4)
+ ASM_TYPE_DIRECTIVE(ln2_2,@object)
+ln2_2: .tfloat 0.3465735902799726547086160
+ ASM_SIZE_DIRECTIVE(ln2_2)
+
+#ifdef PIC
+#define MO(op) op##@GOTOFF(%edx)
+#else
+#define MO(op) op
+#endif
+
+ .text
+ENTRY(__ieee754_atanhl)
+ movl 12(%esp), %ecx
+
+#ifdef PIC
+ call 1f
+1: popl %edx
+ addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
+#endif
+
+ andl $0x8000, %ecx // ECX == 0 iff X >= 0
+
+ fldt MO(ln2_2) // 0.5*ln2
+ xorl %ecx, 12(%esp)
+ fldt 4(%esp) // |x| : 0.5*ln2
+ fcoml MO(half) // |x| : 0.5*ln2
+ fld %st(0) // |x| : |x| : 0.5*ln2
+ fnstsw // |x| : |x| : 0.5*ln2
+ sahf
+ jae 2f
+ fadd %st, %st(1) // |x| : 2*|x| : 0.5*ln2
+ fld %st // |x| : |x| : 2*|x| : 0.5*ln2
+ fsubrl MO(one) // 1-|x| : |x| : 2*|x| : 0.5*ln2
+ fxch // |x| : 1-|x| : 2*|x| : 0.5*ln2
+ fmul %st(2) // 2*|x|^2 : 1-|x| : 2*|x| : 0.5*ln2
+ fdivp // (2*|x|^2)/(1-|x|) : 2*|x| : 0.5*ln2
+ faddp // 2*|x|+(2*|x|^2)/(1-|x|) : 0.5*ln2
+ fcoml MO(limit) // 2*|x|+(2*|x|^2)/(1-|x|) : 0.5*ln2
+ fnstsw // 2*|x|+(2*|x|^2)/(1-|x|) : 0.5*ln2
+ sahf
+ jae 4f
+ fyl2xp1 // 0.5*ln2*ld(1+2*|x|+(2*|x|^2)/(1-|x|))
+ jecxz 3f
+ fchs // 0.5*ln2*ld(1+2*x+(2*x^2)/(1-x))
+3: ret
+
+ .align ALIGNARG(4)
+4: faddl MO(one) // 1+2*|x|+(2*|x|^2)/(1-|x|) : 0.5*ln2
+ fyl2x // 0.5*ln2*ld(1+2*|x|+(2*|x|^2)/(1-|x|))
+ jecxz 3f
+ fchs // 0.5*ln2*ld(1+2*x+(2*x^2)/(1-x))
+3: ret
+
+ .align ALIGNARG(4)
+2: faddl MO(one) // 1+|x| : |x| : 0.5*ln2
+ fxch // |x| : 1+|x| : 0.5*ln2
+ fsubrl MO(one) // 1-|x| : 1+|x| : 0.5*ln2
+ fdivrp // (1+|x|)/(1-|x|) : 0.5*ln2
+ fyl2x // 0.5*ln2*ld((1+|x|)/(1-|x|))
+ jecxz 3f
+ fchs // 0.5*ln2*ld((1+x)/(1-x))
+3: ret
+END(__ieee754_atanhl)