~ubuntu-branches/ubuntu/precise/eglibc/precise-201308281639

« back to all changes in this revision

Viewing changes to sysdeps/ieee754/flt-32/e_gammaf_r.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-08 01:58:09 UTC
  • mfrom: (1.5.3) (288.1.12 precise)
  • Revision ID: package-import@ubuntu.com-20120208015809-ulscst7uteq3e22z
Tags: 2.15~pre6-0ubuntu10
Merge from Debian (r5151, 2.13-26).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Implementation of gamma function according to ISO C.
2
 
   Copyright (C) 1997, 1999, 2001, 2004 Free Software Foundation, Inc.
 
2
   Copyright (C) 1997, 1999, 2001, 2004, 2011 Free Software Foundation, Inc.
3
3
   This file is part of the GNU C Library.
4
4
   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
5
5
 
32
32
 
33
33
  GET_FLOAT_WORD (hx, x);
34
34
 
35
 
  if ((hx & 0x7fffffff) == 0)
 
35
  if (__builtin_expect ((hx & 0x7fffffff) == 0, 0))
36
36
    {
37
37
      /* Return value for x == 0 is Inf with divide by zero exception.  */
38
38
      *signgamp = 0;
39
39
      return 1.0 / x;
40
40
    }
41
 
  if (hx < 0 && (u_int32_t) hx < 0xff800000 && __rintf (x) == x)
 
41
  if (__builtin_expect (hx < 0, 0)
 
42
      && (u_int32_t) hx < 0xff800000 && __rintf (x) == x)
42
43
    {
43
44
      /* Return value for integer x < 0 is NaN with invalid exception.  */
44
45
      *signgamp = 0;
45
46
      return (x - x) / (x - x);
46
47
    }
47
 
  if (hx == 0xff800000)
 
48
  if (__builtin_expect (hx == 0xff800000, 0))
48
49
    {
49
50
      /* x == -Inf.  According to ISO this is NaN.  */
50
51
      *signgamp = 0;
54
55
  /* XXX FIXME.  */
55
56
  return __ieee754_expf (__ieee754_lgammaf_r (x, signgamp));
56
57
}
 
58
strong_alias (__ieee754_gammaf_r, __gammaf_r_finite)