Print this page
5262 libm needs to be carefully unifdef'd
5268 libm doesn't need to hide symbols which are already local


  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 aintf = __aintf
  31 #pragma weak anintf = __anintf
  32 #pragma weak irintf = __irintf
  33 #pragma weak nintf = __nintf
  34 #pragma weak rintf = __rintf

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