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/libmvec/common/__vrsqrt.c
          +++ new/usr/src/lib/libmvec/common/__vrsqrt.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 ↓ 34 lines elided ↑ open up ↑
  76   75   *                                              * z + a2) * z + a1) * z + a0
  77   76   *                      where z = [-1/128, 1/128].
  78   77   *
  79   78   * Accuracy:
  80   79   *      The maximum relative error for the approximating
  81   80   *      polynomial is 2**(-56.26).
  82   81   *      Maximum error observed: less than 0.563 ulp after 1.500.000.000
  83   82   *      results.
  84   83   */
  85   84  
  86      -#define sqrt __sqrt
  87      -
  88   85  extern double sqrt (double);
  89   86  extern const double __vlibm_TBL_rsqrt[];
  90   87  
  91   88  static void
  92   89  __vrsqrt_n(int n, double * restrict px, int stridex, double * restrict py, int stridey);
  93   90  
  94   91  #pragma no_inline(__vrsqrt_n)
  95   92  
  96   93  #define RETURN(ret)                                             \
  97   94  {                                                               \
↓ open down ↓ 307 lines elided ↑ open up ↑
 405  402                  res0 = dexp_hi0 * res0 + dexp_lo0 + dexp_hi0;
 406  403  
 407  404                  HI(&dsqrt_exp0) = sqrt_exp0;
 408  405                  LO(&dsqrt_exp0) = 0;
 409  406                  res0 *= dsqrt_exp0;
 410  407  
 411  408                  *py = res0;
 412  409                  py += stridey;
 413  410          }
 414  411  }
 415      -
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX