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 fmax = __fmax
  32 #endif
  33 
  34 /*
  35  * fmax(x,y) returns the larger of x and y.  If just one of the
  36  * arguments is NaN, fmax returns the other argument.  If both
  37  * arguments are NaN, fmax returns NaN.
  38  *
  39  * See fmaxf.c for a discussion of implementation trade-offs.
  40  */
  41 
  42 #include "libm.h"       /* for isgreaterequal macro */
  43 #include <fenv.h>
  44 
  45 double
  46 __fmax(double x, double y) {
  47         union {
  48                 unsigned i[2];
  49                 double d;
  50         } xx, yy;
  51         unsigned s;
  52 




  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 fmax = __fmax

  31 
  32 /*
  33  * fmax(x,y) returns the larger of x and y.  If just one of the
  34  * arguments is NaN, fmax returns the other argument.  If both
  35  * arguments are NaN, fmax returns NaN.
  36  *
  37  * See fmaxf.c for a discussion of implementation trade-offs.
  38  */
  39 
  40 #include "libm.h"       /* for isgreaterequal macro */
  41 #include <fenv.h>
  42 
  43 double
  44 __fmax(double x, double y) {
  45         union {
  46                 unsigned i[2];
  47                 double d;
  48         } xx, yy;
  49         unsigned s;
  50