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 rintl = __rintl
  31 
  32 /*
  33  * rintl(long double x) return x rounded to integral according to
  34  * the prevailing rounding direction
  35  *
  36  * NOTE: aintl(x), anintl(x), ceill(x), floorl(x), and rintl(x) return result
  37  * with the same sign as x's, including 0.0L.
  38  */
  39 
  40 #include "libm.h"
  41 #include "longdouble.h"
  42 
  43 extern enum fp_precision_type __swapRP(enum fp_precision_type);
  44 
  45 static const double one = 1.0;
  46 static const long double qzero = 0.0L;
  47 
  48 long double
  49 rintl(long double x) {
  50         enum fp_precision_type rp;




  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 __rintl = rintl
  31 
  32 /*
  33  * rintl(long double x) return x rounded to integral according to
  34  * the prevailing rounding direction
  35  *
  36  * NOTE: aintl(x), anintl(x), ceill(x), floorl(x), and rintl(x) return result
  37  * with the same sign as x's, including 0.0L.
  38  */
  39 
  40 #include "libm.h"
  41 #include "longdouble.h"
  42 
  43 extern enum fp_precision_type __swapRP(enum fp_precision_type);
  44 
  45 static const double one = 1.0;
  46 static const long double qzero = 0.0L;
  47 
  48 long double
  49 rintl(long double x) {
  50         enum fp_precision_type rp;