Print this page
5261 libm should stop using synonyms.h

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/C/sincospi.c
          +++ new/usr/src/lib/libm/common/C/sincospi.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 sincospi = __sincospi
  31      -
  32   30  /* INDENT OFF */
  33   31  /*
  34   32   * void sincospi(double x, double *s, double *c)
  35   33   * *s = sin(pi*x); *c = cos(pi*x);
  36   34   *
  37   35   * Algorithm, 10/17/2002, K.C. Ng
  38   36   * ------------------------------
  39   37   * Let y = |4x|, z = floor(y), and n = (int)(z mod 8.0) (displayed in binary).
  40   38   *      1. If y == z, then x is a multiple of pi/4. Return the following values:
  41   39   *             ---------------------------------------------------
↓ open down ↓ 23 lines elided ↑ open up ↑
  65   63   *             ---------------------------------------------------
  66   64   *
  67   65   * NOTE. This program compute sinpi/cospi(t<0.25) by __k_sin/cos(pi*t, 0.0).
  68   66   * This will return a result with error slightly more than one ulp (but less
  69   67   * than 2 ulp). If one wants accurate result,  one may break up pi*t in
  70   68   * high (tpi_h) and low (tpi_l) parts and call __k_sin/cos(tip_h, tip_lo)
  71   69   * instead.
  72   70   */
  73   71  
  74   72  #include "libm.h"
  75      -#include "libm_synonyms.h"
  76   73  #include "libm_protos.h"
  77   74  #include "libm_macros.h"
  78   75  #include <math.h>
  79   76  #if defined(__SUNPRO_C)
  80   77  #include <sunmath.h>
  81   78  #endif
  82   79  
  83   80  static const double
  84   81          pi      = 3.14159265358979323846,       /* 400921FB,54442D18 */
  85   82          sqrth_h = 0.70710678118654757273731092936941422522068023681640625,
↓ open down ↓ 106 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX