Print this page
5261 libm should stop using synonyms.h

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/C/asinh.c
          +++ new/usr/src/lib/libm/common/C/asinh.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 asinh = __asinh
       30 +#pragma weak __asinh = asinh
  31   31  
  32   32  /* INDENT OFF */
  33   33  /*
  34   34   * asinh(x)
  35   35   * Method :
  36   36   *      Based on
  37   37   *              asinh(x) = sign(x) * log [ |x| + sqrt(x*x+1) ]
  38   38   *      we have
  39   39   *      asinh(x) := x  if  1+x*x == 1,
  40   40   *               := sign(x)*(log(x)+ln2)) for large |x|, else
  41   41   *               := sign(x)*log(2|x|+1/(|x|+sqrt(x*x+1))) if|x| > 2, else
  42   42   *               := sign(x)*log1p(|x|+x^2/(1+sqrt(1+x^2)))
  43   43   */
  44   44  /* INDENT ON */
  45   45  
  46      -#include "libm_synonyms.h"      /* __asinh */
  47   46  #include "libm_macros.h"
  48   47  #include <math.h>
  49   48  
  50   49  static const double xxx[] = {
  51   50  /* one */       1.00000000000000000000e+00,     /* 3FF00000, 00000000 */
  52   51  /* ln2 */       6.93147180559945286227e-01,     /* 3FE62E42, FEFA39EF */
  53   52  /* huge */      1.00000000000000000000e+300
  54   53  };
  55   54  #define one     xxx[0]
  56   55  #define ln2     xxx[1]
↓ open down ↓ 33 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX