glibc/sysdeps/libm-ieee754/w_gammal.c
Ulrich Drepper 356d71003e Update.
1998-04-07  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* sysdeps/unix/sysv/linux/bits/sockunion.h: Fix error message.

	* manual/socket.texi (Interface Naming): Fix typo.

1998-04-07  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* manual/examples/filesrv.c (main): Remove filename first.

	* manual/socket.texi (Address Formats): Change ?F_LOCAL, ?F_FILE,
	?F_UNIX.

	* manual/examples/mkfsock.c (make_named_socket): Use PF_LOCAL
	instead of PF_UNIX.

	* manual/examples/filecli.c (main): Use AF_LOCAL
	instead of AF_UNIX.

1998-04-09  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/libm-ieee754/s_signgam.c: Define __signgam and make
	signgam weak alias.
	* sysdeps/libm-ieee754/w_lgamma.c: Use __signgam not signgam.
	* sysdeps/libm-ieee754/w_lgammaf.c: Likewise.
	* sysdeps/libm-ieee754/w_lgammal.c: Likewise.
	* sysdeps/libm-ieee754/w_gamma.c: Likewise.
	* sysdeps/libm-ieee754/w_gammaf.c: Likewise.
	* sysdeps/libm-ieee754/w_gammal.c: Likewise.

	* login/utmp_daemon.c (open_socket): Use __connect not connect.

	* sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h (SA_LEN): New macro.
	* Makerules: Re-add missing rule for $(objpfx)stamp.oS.
1998-04-09 14:14:20 +00:00

62 lines
1.5 KiB
C

/* w_gammal.c -- long double version of w_gamma.c.
* Conversion to long double by Ulrich Drepper,
* Cygnus Support, drepper@cygnus.com.
*/
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: $";
#endif
/* long double gammal(double x)
* Return the Gamma function of x.
*/
#include "math.h"
#include "math_private.h"
extern int __signgam;
#ifdef __STDC__
long double __gammal(long double x)
#else
long double __gammal(x)
long double x;
#endif
{
long double y;
#ifndef _IEEE_LIBM
if (_LIB_VERSION == _SVID_)
y = __ieee754_lgammal_r(x,&__signgam);
else
{
#endif
int local_signgam;
y = __ieee754_gammal_r(x,&local_signgam);
if (local_signgam < 0) y = -y;
#ifdef _IEEE_LIBM
return y;
#else
if(_LIB_VERSION == _IEEE_) return y;
}
if(!__finitel(y)&&__finitel(x)) {
if(__floorl(x)==x&&x<=0.0)
return __kernel_standard(x,x,241); /* gamma pole */
else
return __kernel_standard(x,x,240); /* gamma overflow */
} else
return y;
#endif
}
weak_alias (__gammal, gammal)