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/complex/clog.c
          +++ new/usr/src/lib/libm/common/complex/clog.c
↓ open down ↓ 52 lines elided ↑ open up ↑
  53   53   *    clog(+inf + iy   )=  +inf + i 0 , for finite positive-signed y
  54   54   *    clog(-inf + i inf)=  inf  + i 3pi/4
  55   55   *    clog(+inf + i inf)=  inf  + i pi/4
  56   56   *    clog(+-inf+ i NaN)=  inf  + i NaN
  57   57   *    clog(NaN  + i y  )=  NaN  + i NaN for finite y
  58   58   *    clog(NaN  + i inf)=  inf  + i NaN
  59   59   *    clog(NaN  + i NaN)=  NaN  + i NaN
  60   60   */
  61   61  /* INDENT ON */
  62   62  
  63      -#include "libm_synonyms.h"
  64   63  #include <math.h>               /* atan2/fabs/log/log1p */
  65   64  #include "complex_wrapper.h"
  66   65  #include "libm_protos.h"        /* __k_clog_r */
  67   66  
  68   67  
  69   68  static const double half = 0.5, one = 1.0;
  70   69  
  71   70  dcomplex
  72      -clog(dcomplex z) {
       71 +__clog(dcomplex z) {
  73   72          dcomplex        ans;
  74   73          double          x, y, t, ax, ay, w;
  75   74          int             n, ix, iy, hx, hy;
  76   75          unsigned        lx, ly;
  77   76  
  78   77          x = D_RE(z);
  79   78          y = D_IM(z);
  80   79          hx = HI_WORD(x);
  81   80          lx = LO_WORD(x);
  82   81          hy = HI_WORD(y);
↓ open down ↓ 52 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX