mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
0a61487785
1998-02-17 15:10 Ulrich Drepper <drepper@cygnus.com> * elf/dl-load.c (open_path): Use __xstat instead of stat. * localedata/tst-locale.sh: Comment out first test for now. 1998-02-14 14:58 H.J. Lu <hjl@gnu.org> * sysdeps/generic/_G_config.h (_G_HAVE_IO_GETLINE_INFO): Defined as 1. * sysdeps/unix/sysv/linux/_G_config.h (_G_HAVE_IO_GETLINE_INFO): Likewise. * libio/iogetline.c (_IO_getline_info): Renamed from _IO_getline. (_IO_getline): Just call _IO_getline_info. * libio/libioP.h (_IO_getline_info): New declaration. * libc.map (_IO_getline_info, __write): Added. 1998-02-17 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sunrpc/rpc_cout.c (inline_struct): Change typo of plus to const char* to shut up gcc. 1998-02-17 11:37 Ulrich Drepper <drepper@cygnus.com> * eld/dl-open.c (_dl_open): Assign correct value to new->l_global. Patch forwarded by Cristian Gafton <gafton@redhat.com>. * math/math.h: Define M_* constants always as `double' and add new macros M_*l which are of type `long double'. * sysdeps/libm-ieee754/s_cacoshl.c: Use M_*l constants now. * sysdeps/libm-ieee754/s_cacosl.c: Likewise. * sysdeps/libm-ieee754/s_casinhl.c: Likewise. * sysdeps/libm-ieee754/s_catanhl.c: Likewise. * sysdeps/libm-ieee754/s_catanl.c: Likewise. * sysdeps/libm-ieee754/s_clog10l.c: Likewise. * sysdeps/libm-ieee754/s_clogl.c: Likewise. * math/libm-tst.c: Likewise. * sysdeps/i386/fpu/bits/mathinline.h (__M_SQRT2): Don't use _Mdbl, define as long double unconditionally. 1998-02-17 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/arith.texi (Old-style number conversion): Correct some typos. 1998-02-16 16:28 H.J. Lu <hjl@gnu.org> * time/Makefile (tz-cflags, CFLAGS-tzfile.c, CFLAGS-tzset.c): Restore. * timezone/Makefile (CFLAGS-tzfile.c, CFLAGS-tzset.c): Deleted.
85 lines
2.3 KiB
C
85 lines
2.3 KiB
C
/* Return arc hyperbole cosine for long double value.
|
|
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public License as
|
|
published by the Free Software Foundation; either version 2 of the
|
|
License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
#include <complex.h>
|
|
#include <math.h>
|
|
|
|
|
|
__complex__ long double
|
|
__cacoshl (__complex__ long double x)
|
|
{
|
|
__complex__ long double res;
|
|
int rcls = fpclassify (__real__ x);
|
|
int icls = fpclassify (__imag__ x);
|
|
|
|
if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
|
|
{
|
|
if (icls == FP_INFINITE)
|
|
{
|
|
__real__ res = HUGE_VALL;
|
|
|
|
if (rcls == FP_NAN)
|
|
__imag__ res = __nanl ("");
|
|
else
|
|
__imag__ res = __copysignl ((rcls == FP_INFINITE
|
|
? (__real__ x < 0.0
|
|
? M_PIl - M_PI_4l : M_PI_4l)
|
|
: M_PI_2l), __imag__ x);
|
|
}
|
|
else if (rcls == FP_INFINITE)
|
|
{
|
|
__real__ res = HUGE_VALL;
|
|
|
|
if (icls >= FP_ZERO)
|
|
__imag__ res = __copysignl (signbit (__real__ x) ? M_PIl : 0.0,
|
|
__imag__ x);
|
|
else
|
|
__imag__ res = __nanl ("");
|
|
}
|
|
else
|
|
{
|
|
__real__ res = __nanl ("");
|
|
__imag__ res = __nanl ("");
|
|
}
|
|
}
|
|
else if (rcls == FP_ZERO && icls == FP_ZERO)
|
|
{
|
|
__real__ res = 0.0;
|
|
__imag__ res = __copysignl (M_PI_2l, __imag__ x);
|
|
}
|
|
else
|
|
{
|
|
__complex__ long double y;
|
|
|
|
__real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
|
|
__imag__ y = 2.0 * __real__ x * __imag__ x;
|
|
|
|
y = __csqrtl (y);
|
|
|
|
__real__ y += __real__ x;
|
|
__imag__ y += __imag__ x;
|
|
|
|
res = __clogl (y);
|
|
}
|
|
|
|
return res;
|
|
}
|
|
weak_alias (__cacoshl, cacoshl)
|