Print this page
5261 libm should stop using synonyms.h


  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 pow = __pow
  31 
  32 /*
  33  * pow(x,y) return x**y
  34  *                    n
  35  * Method:  Let x =  2   * (1+f)
  36  *      1. Compute and return log2(x) in two pieces:
  37  *              log2(x) = w1 + w2,
  38  *         where w1 has 24 bits trailing zero.
  39  *      2. Perform y*log2(x) by simulating muti-precision arithmetic
  40  *      3. Return x**y = exp2(y*log(x))
  41  *
  42  * Special cases:
  43  *      1.  (anything) ** +-0 is 1
  44  *      1'. 1 ** (anything)   is 1      (C99; 1 ** +-INF/NAN used to be NAN)
  45  *      2.  (anything) ** 1   is itself
  46  *      3.  (anything except 1) ** NAN is NAN ("except 1" is C99)
  47  *      4.  NAN ** (anything except 0) is NAN
  48  *      5.  +-(|x| > 1) **  +INF is +INF
  49  *      6.  +-(|x| > 1) **  -INF is +0
  50  *      7.  +-(|x| < 1) **  +INF is +0




  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 __pow = pow
  31 
  32 /*
  33  * pow(x,y) return x**y
  34  *                    n
  35  * Method:  Let x =  2   * (1+f)
  36  *      1. Compute and return log2(x) in two pieces:
  37  *              log2(x) = w1 + w2,
  38  *         where w1 has 24 bits trailing zero.
  39  *      2. Perform y*log2(x) by simulating muti-precision arithmetic
  40  *      3. Return x**y = exp2(y*log(x))
  41  *
  42  * Special cases:
  43  *      1.  (anything) ** +-0 is 1
  44  *      1'. 1 ** (anything)   is 1      (C99; 1 ** +-INF/NAN used to be NAN)
  45  *      2.  (anything) ** 1   is itself
  46  *      3.  (anything except 1) ** NAN is NAN ("except 1" is C99)
  47  *      4.  NAN ** (anything except 0) is NAN
  48  *      5.  +-(|x| > 1) **  +INF is +INF
  49  *      6.  +-(|x| > 1) **  -INF is +0
  50  *      7.  +-(|x| < 1) **  +INF is +0