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

« back to all changes in this revision

Viewing changes to sysdeps/ieee754/flt-32/s_roundf.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
/* Round float to integer away from zero.
2
 
   Copyright (C) 1997 Free Software Foundation, Inc.
 
2
   Copyright (C) 1997, 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
 
37
37
    {
38
38
      if (j0 < 0)
39
39
        {
40
 
          if (huge + x > 0.0F)
41
 
            {
42
 
              i0 &= 0x80000000;
43
 
              if (j0 == -1)
44
 
                i0 |= 0x3f800000;
45
 
            }
 
40
          math_force_eval (huge + x);
 
41
 
 
42
          i0 &= 0x80000000;
 
43
          if (j0 == -1)
 
44
            i0 |= 0x3f800000;
46
45
        }
47
46
      else
48
47
        {
50
49
          if ((i0 & i) == 0)
51
50
            /* X is integral.  */
52
51
            return x;
53
 
          if (huge + x > 0.0F)
54
 
            {
55
 
              /* Raise inexact if x != 0.  */
56
 
              i0 += 0x00400000 >> j0;
57
 
              i0 &= ~i;
58
 
            }
 
52
          math_force_eval (huge + x);
 
53
 
 
54
          /* Raise inexact if x != 0.  */
 
55
          i0 += 0x00400000 >> j0;
 
56
          i0 &= ~i;
59
57
        }
60
58
    }
61
59
  else