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/C/log2.c
          +++ new/usr/src/lib/libm/common/C/log2.c
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24   24   */
  25   25  /*
  26   26   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27   27   * Use is subject to license terms.
  28   28   */
  29   29  
  30      -#pragma weak log2 = __log2
       30 +#pragma weak __log2 = log2
  31   31  
  32   32  /* INDENT OFF */
  33   33  /*
  34   34   * log2(x) = log(x)/log2
  35   35   *
  36   36   * Base on Table look-up algorithm with product polynomial
  37   37   * approximation for log(x).
  38   38   *
  39   39   * By K.C. Ng, Nov 29, 2004
  40   40   *
↓ open down ↓ 40 lines elided ↑ open up ↑
  81   81   *
  82   82   * Constants:
  83   83   * The hexadecimal values are the intended ones for the following constants.
  84   84   * The decimal values may be used, provided that the compiler will convert
  85   85   * from decimal to binary accurately enough to produce the hexadecimal values
  86   86   * shown.
  87   87   */
  88   88  /* INDENT ON */
  89   89  
  90   90  #include "libm.h"
  91      -#include "libm_synonyms.h"
  92   91  #include "libm_protos.h"
  93   92  
  94   93  extern const double _TBL_log[];
  95   94  
  96   95  static const double P[] = {
  97   96  /* ONE   */  1.0,
  98   97  /* TWO52 */  4503599627370496.0,
  99   98  /* LN10V */  1.4426950408889634073599246810018920433347,   /* 1/log10 */
 100   99  /* ZERO  */  0.0,
 101  100  /* A1    */ -9.6809362455249638217841932228967194640116e-02,
↓ open down ↓ 126 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX