Print this page
5261 libm should stop using synonyms.h
5298 fabs is 0-sized, confuses dis(1) and others
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Gordon Ross <gwr@nexenta.com>


  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #pragma weak remquo = __remquo
  31 
  32 /* INDENT OFF */
  33 /*
  34  * double remquo(double x, double y, int *quo) return remainder(x,y) and an
  35  * integer pointer quo such that *quo = N mod {2**31}, where N is the
  36  * exact integral part of x/y rounded to nearest even.
  37  *
  38  * remquo call internal fmodquo
  39  */
  40 /* INDENT ON */
  41 
  42 #include "libm.h"
  43 #include "libm_synonyms.h"
  44 #include "libm_protos.h"
  45 #include <math.h>         /* fabs() */
  46 #include <sys/isa_defs.h>
  47 
  48 #if defined(_BIG_ENDIAN)
  49 #define HIWORD  0
  50 #define LOWORD  1
  51 #else
  52 #define HIWORD  1
  53 #define LOWORD  0
  54 #endif
  55 #define __HI(x) ((int *) &x)[HIWORD]
  56 #define __LO(x) ((int *) &x)[LOWORD]
  57 
  58 static const double one = 1.0, Zero[] = {0.0, -0.0};
  59 
  60 static double
  61 fmodquo(double x, double y, int *quo) {
  62         int n, hx, hy, hz, ix, iy, sx, sq, i, m;
  63         unsigned lx, ly, lz;




  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #pragma weak __remquo = remquo
  31 
  32 /* INDENT OFF */
  33 /*
  34  * double remquo(double x, double y, int *quo) return remainder(x,y) and an
  35  * integer pointer quo such that *quo = N mod {2**31}, where N is the
  36  * exact integral part of x/y rounded to nearest even.
  37  *
  38  * remquo call internal fmodquo
  39  */
  40 /* INDENT ON */
  41 
  42 #include "libm.h"

  43 #include "libm_protos.h"
  44 #include <math.h>         /* fabs() */
  45 #include <sys/isa_defs.h>
  46 
  47 #if defined(_BIG_ENDIAN)
  48 #define HIWORD  0
  49 #define LOWORD  1
  50 #else
  51 #define HIWORD  1
  52 #define LOWORD  0
  53 #endif
  54 #define __HI(x) ((int *) &x)[HIWORD]
  55 #define __LO(x) ((int *) &x)[LOWORD]
  56 
  57 static const double one = 1.0, Zero[] = {0.0, -0.0};
  58 
  59 static double
  60 fmodquo(double x, double y, int *quo) {
  61         int n, hx, hy, hz, ix, iy, sx, sq, i, m;
  62         unsigned lx, ly, lz;