* sysdeps/ieee754/dbl-64/e_lgamma_r.c: Fix *signgamp for -0.0.
* sysdeps/ieee754/flt-32/e_lgammaf_r.c: Likewise.
* sysdeps/ieee754/ldbl-96/e_lgammal_r.c: Likewise.
* math/libm-test.inc: Add test for this case.
Half the patch by Christian Iseli <christian.iseli@licr.org>.
2007-10-06 Ulrich Drepper <drepper@redhat.com>
+ [BZ #4407]
+ * sysdeps/ieee754/dbl-64/e_lgamma_r.c: Fix *signgamp for -0.0.
+ * sysdeps/ieee754/flt-32/e_lgammaf_r.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_lgammal_r.c: Likewise.
+ * math/libm-test.inc: Add test for this case.
+
[BZ #5010]
* sunrpc/svc.c (struct svc_callout): Add sc_mapped element.
(svc_register): Initialize sc_mapped. Set to TRUE if call to
* string/bits/string2.h (__strdup): Cast parameters to calloc to
avoid warning with -Wconversion.
(__strndup): Likewise.
- Patch to 50% by Christian Iseli <christian.iseli@licr.org>.
+ Half the patch by Christian Iseli <christian.iseli@licr.org>.
[BZ #5112]
* nscd/connections.c (restart): Don't resync if database is
-/* Copyright (C) 1997-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1997.
TEST_f_f (lgamma, plus_infty, plus_infty);
TEST_f_f (lgamma, 0, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("signgam for lgamma(0) == 1", signgam, 1, 0, 0, 0);
+ TEST_f_f (lgamma, minus_zero, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ check_int ("signgam for lgamma(-0) == -1", signgam, -1, 0, 0, 0);
TEST_f_f (lgamma, nan_value, nan_value);
/* lgamma (x) == +inf plus divide by zero exception for integer x <= 0. */
*signgamp = 1;
ix = hx&0x7fffffff;
if(ix>=0x7ff00000) return x*x;
- if((ix|lx)==0) return one/fabs(x);
+ if((ix|lx)==0)
+ {
+ if (hx < 0)
+ *signgamp = -1;
+ return one/fabs(x);
+ }
if(ix<0x3b900000) { /* |x|<2**-70, return -log(|x|) */
if(hx<0) {
*signgamp = -1;
*signgamp = 1;
ix = hx&0x7fffffff;
if(ix>=0x7f800000) return x*x;
- if(ix==0) return one/fabsf(x);
+ if(ix==0)
+ {
+ if (hx < 0)
+ *signgamp = -1;
+ return one/fabsf(x);
+ }
if(ix<0x1c800000) { /* |x|<2**-70, return -log(|x|) */
if(hx<0) {
*signgamp = -1;
/* Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ 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
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
ix = se & 0x7fff;
if ((ix | i0 | i1) == 0)
- return one / fabsl (x);
+ {
+ if (se & 0x8000)
+ *signgamp = -1;
+ return one / fabsl (x);
+ }
ix = (ix << 16) | (i0 >> 16);