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 nearbyint = __nearbyint
  32 #endif
  33 
  34 /*
  35  * nearbyint(x) returns the nearest fp integer to x in the direction
  36  * corresponding to the current rounding direction without raising
  37  * the inexact exception.
  38  *
  39  * nearbyint(x) is x unchanged if x is +/-0 or +/-inf.  If x is NaN,
  40  * nearbyint(x) is also NaN.
  41  */
  42 
  43 #include "libm.h"
  44 #include "fenv_synonyms.h"
  45 #include <fenv.h>
  46 
  47 double
  48 __nearbyint(double x) {
  49         union {
  50                 unsigned i[2];
  51                 double d;
  52         } xx;




  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 nearbyint = __nearbyint

  31 
  32 /*
  33  * nearbyint(x) returns the nearest fp integer to x in the direction
  34  * corresponding to the current rounding direction without raising
  35  * the inexact exception.
  36  *
  37  * nearbyint(x) is x unchanged if x is +/-0 or +/-inf.  If x is NaN,
  38  * nearbyint(x) is also NaN.
  39  */
  40 
  41 #include "libm.h"
  42 #include "fenv_synonyms.h"
  43 #include <fenv.h>
  44 
  45 double
  46 __nearbyint(double x) {
  47         union {
  48                 unsigned i[2];
  49                 double d;
  50         } xx;