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>
5262 libm needs to be carefully unifdef'd
5268 libm doesn't need to hide symbols which are already local
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
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 #if defined(ELFOBJ)
  31 #pragma weak aintf = __aintf
  32 #pragma weak anintf = __anintf
  33 #pragma weak irintf = __irintf
  34 #pragma weak nintf = __nintf
  35 #pragma weak rintf = __rintf
  36 #endif
  37 
  38 /* INDENT OFF */
  39 /*
  40  * aintf(x)     return x chopped to integral value
  41  * anintf(x)    return sign(x)*(|x|+0.5) chopped to integral value
  42  * irintf(x)    return rint(x) in integer format
  43  * nintf(x)     return anint(x) in integer format
  44  * rintf(x)     return x rounded to integral according to the rounding direction
  45  *
  46  * NOTE: rintf(x), aintf(x) and anintf(x) return results with the same sign as
  47  * x's,  including 0.0.
  48  */
  49 
  50 #include "libm.h"
  51 
  52 static const float xf[] = {
  53 /* ZEROF */     0.0f,
  54 /* TWO_23F */   8.3886080000e6f,
  55 /* MTWO_23F */  -8.3886080000e6f,
  56 /* ONEF */      1.0f,




  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 __rintf = rintf






  31 
  32 /* INDENT OFF */
  33 /*
  34  * aintf(x)     return x chopped to integral value
  35  * anintf(x)    return sign(x)*(|x|+0.5) chopped to integral value
  36  * irintf(x)    return rint(x) in integer format
  37  * nintf(x)     return anint(x) in integer format
  38  * rintf(x)     return x rounded to integral according to the rounding direction
  39  *
  40  * NOTE: rintf(x), aintf(x) and anintf(x) return results with the same sign as
  41  * x's,  including 0.0.
  42  */
  43 
  44 #include "libm.h"
  45 
  46 static const float xf[] = {
  47 /* ZEROF */     0.0f,
  48 /* TWO_23F */   8.3886080000e6f,
  49 /* MTWO_23F */  -8.3886080000e6f,
  50 /* ONEF */      1.0f,