]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/ieee754/dbl-64/s_remquo.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / ieee754 / dbl-64 / s_remquo.c
index 6e32efbba2bd614098c4836f7ea2ef66dd6c7531..27249029081f6f5b74a1e0d30cc4d650b6fabb58 100644 (file)
@@ -1,26 +1,25 @@
 /* Compute remainder and a congruent to the quotient.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 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.
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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.
+   Lesser 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.  */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <math.h>
 
-#include "math_private.h"
+#include <math_private.h>
 
 
 static const double zero = 0.0;
@@ -29,8 +28,8 @@ static const double zero = 0.0;
 double
 __remquo (double x, double y, int *quo)
 {
-  int32_t hx,hy;
-  u_int32_t sx,lx,ly;
+  int32_t hx, hy;
+  u_int32_t sx, lx, ly;
   int cquo, qs;
 
   EXTRACT_WORDS (hx, lx, x);
@@ -42,14 +41,14 @@ __remquo (double x, double y, int *quo)
 
   /* Purge off exception values.  */
   if ((hy | ly) == 0)
-    return (x * y) / (x * y);                  /* y = 0 */
-  if ((hx >= 0x7ff00000)                       /* x not finite */
-      || ((hy >= 0x7ff00000)                   /* p is NaN */
+    return (x * y) / (x * y);                   /* y = 0 */
+  if ((hx >= 0x7ff00000)                        /* x not finite */
+      || ((hy >= 0x7ff00000)                    /* p is NaN */
          && (((hy - 0x7ff00000) | ly) != 0)))
     return (x * y) / (x * y);
 
   if (hy <= 0x7fbfffff)
-    x = __ieee754_fmod (x, 8 * y);             /* now x < 8y */
+    x = __ieee754_fmod (x, 8 * y);              /* now x < 8y */
 
   if (((hx - hy) | (lx - ly)) == 0)
     {
@@ -57,8 +56,8 @@ __remquo (double x, double y, int *quo)
       return zero * x;
     }
 
-  x  = fabs (x);
-  y  = fabs (y);
+  x = fabs (x);
+  y = fabs (y);
   cquo = 0;
 
   if (x >= 4 * y)