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 log10l = __log10l
  32 #endif
  33 
  34 /*
  35  * log10l(X)
  36  *
  37  * Method :
  38  *      Let log10_2hi = leading 98(SPARC)/49(x86) bits of log10(2) and
  39  *          log10_2lo = log10(2) - log10_2hi,
  40  *          ivln10   = 1/log(10) rounded.
  41  *      Then
  42  *              n = ilogb(x),
  43  *              if (n<0)  n = n+1;
  44  *              x = scalbn(x,-n);
  45  *              LOG10(x) := n*log10_2hi + (n*log10_2lo + ivln10*log(x))
  46  *
  47  * Note1:
  48  *      For fear of destroying log10(10**n)=n, the rounding mode is
  49  *      set to Round-to-Nearest.
  50  *
  51  * Special cases:
  52  *      log10(x) is NaN with signal if x < 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 log10l = __log10l

  31 
  32 /*
  33  * log10l(X)
  34  *
  35  * Method :
  36  *      Let log10_2hi = leading 98(SPARC)/49(x86) bits of log10(2) and
  37  *          log10_2lo = log10(2) - log10_2hi,
  38  *          ivln10   = 1/log(10) rounded.
  39  *      Then
  40  *              n = ilogb(x),
  41  *              if (n<0)  n = n+1;
  42  *              x = scalbn(x,-n);
  43  *              LOG10(x) := n*log10_2hi + (n*log10_2lo + ivln10*log(x))
  44  *
  45  * Note1:
  46  *      For fear of destroying log10(10**n)=n, the rounding mode is
  47  *      set to Round-to-Nearest.
  48  *
  49  * Special cases:
  50  *      log10(x) is NaN with signal if x < 0;