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>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/Q/log2l.c
          +++ new/usr/src/lib/libm/common/Q/log2l.c
↓ open down ↓ 31 lines elided ↑ open up ↑
  32   32   * RETURN THE BASE 2 LOGARITHM OF X
  33   33   *
  34   34   * Method:
  35   35   *      purge off 0,INF, and NaN.
  36   36   *      n = ilogb(x)
  37   37   *      if (n<0) n+=1
  38   38   *      z = scalbn(x,-n)
  39   39   *      LOG2(x) = n + (1/ln2)*log(x)
  40   40   */
  41   41  
  42      -#pragma weak log2l = __log2l
       42 +#pragma weak __log2l = log2l
  43   43  
  44   44  #include "libm.h"
  45   45  #include "longdouble.h"
  46   46  
  47   47  static const long double
  48   48          zero    = 0.0L,
  49   49          half    = 0.5L,
  50   50          one     = 1.0L,
  51   51          invln2  = 1.442695040888963407359924681001892137427e+0000L;
  52   52  
↓ open down ↓ 14 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX