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