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/__vhypot.c
          +++ new/usr/src/lib/libmvec/common/__vhypot.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 ↓ 17 lines elided ↑ open up ↑
  59   58   *              ynm = y * (1/m)
  60   59   *
  61   60   *      Compute xnm * xnm + ynm * ynm by simulating
  62   61   *      muti-precision arithmetic.
  63   62   *
  64   63   * Accuracy:
  65   64   *      Maximum error observed: less than 0.872 ulp after 16.777.216.000
  66   65   *      results.
  67   66   */
  68   67  
  69      -#define sqrt __sqrt
  70      -
  71   68  extern double sqrt(double);
  72   69  extern double fabs(double);
  73   70  
  74   71  static const unsigned long long LCONST[] = {
  75   72  0x41b0000000000000ULL,  /* D2ON28 = 2 ** 28             */
  76   73  0x0010000000000000ULL,  /* D2ONM1022 = 2 ** -1022       */
  77   74  0x7fd0000000000000ULL   /* D2ONP1022 = 2 **  1022       */
  78   75  };
  79   76  
  80   77  static void
↓ open down ↓ 306 lines elided ↑ open up ↑
 387  384                  res0 = sqrt(res0);
 388  385  
 389  386                  HI(&scl0) = j0;
 390  387  
 391  388                  res0 = scl0 * res0;
 392  389                  *pz = res0;
 393  390  
 394  391                  pz += stridez;
 395  392          }
 396  393  }
 397      -
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX