Print this page
5261 libm should stop using synonyms.h

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libmvec/common/__vrhypot.c
          +++ new/usr/src/lib/libmvec/common/__vrhypot.c
↓ open down ↓ 20 lines elided ↑ open up ↑
  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   30  #include <sys/isa_defs.h>
  31      -#include "libm_synonyms.h"
  32   31  #include "libm_inlines.h"
  33   32  
  34   33  #ifdef _LITTLE_ENDIAN
  35   34  #define HI(x)   *(1+(int*)x)
  36   35  #define LO(x)   *(unsigned*)x
  37   36  #else
  38   37  #define HI(x)   *(int*)x
  39   38  #define LO(x)   *(1+(unsigned*)x)
  40   39  #endif
  41   40  
↓ open down ↓ 18 lines elided ↑ open up ↑
  60   59   *              ynm = y * m
  61   60   *
  62   61   *      Compute 1/(xnm * xnm + ynm * ynm) by simulating
  63   62   *      muti-precision arithmetic.
  64   63   *
  65   64   * Accuracy:
  66   65   *      Maximum error observed: less than 0.869 ulp after 1.000.000.000
  67   66   *      results.
  68   67   */
  69   68  
  70      -#define sqrt __sqrt
  71      -
  72   69  extern double sqrt(double);
  73      -
  74   70  extern double fabs(double);
  75   71  
  76   72  static const int __vlibm_TBL_rhypot[] = {
  77   73  /* i = [0,127]
  78   74   * TBL[i] = 0x3ff00000 + *(int*)&(1.0 / *(double*)&(0x3ff0000000000000ULL + (i << 45))); */
  79   75   0x7fe00000,  0x7fdfc07f, 0x7fdf81f8,  0x7fdf4465,
  80   76   0x7fdf07c1,  0x7fdecc07, 0x7fde9131,  0x7fde573a,
  81   77   0x7fde1e1e,  0x7fdde5d6, 0x7fddae60,  0x7fdd77b6,
  82   78   0x7fdd41d4,  0x7fdd0cb5, 0x7fdcd856,  0x7fdca4b3,
  83   79   0x7fdc71c7,  0x7fdc3f8f, 0x7fdc0e07,  0x7fdbdd2b,
↓ open down ↓ 337 lines elided ↑ open up ↑
 421  417                          LO(&res1) = 0;
 422  418                          res1 += (DONE - res1_hi * res1 - res1_lo * res1) * dres1;
 423  419                          res1 = sqrt (res1);
 424  420  
 425  421                          res1 = scl1 * res1;
 426  422  
 427  423                          *pz1 = res1;
 428  424                  }
 429  425          }
 430  426  }
 431      -
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX