Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/Q/atan2l.c
          +++ new/usr/src/lib/libm/common/Q/atan2l.c
↓ open down ↓ 95 lines elided ↑ open up ↑
  96   96                          return (PI + tiny);     /* atan(+0,-anything) */
  97   97                  case 3:
  98   98                          return (-PI - tiny);    /* atan(-0,-anything) */
  99   99                  }
 100  100  
 101  101          /* when x = 0 */
 102  102          if (x == zero)
 103  103                  return (signy == 1 ? -PIo2 - tiny : PIo2 + tiny);
 104  104  
 105  105          /* when x is INF */
 106      -        if (!finitel(x))
      106 +        if (!finitel(x)) {
 107  107                  if (!finitel(y)) {
 108  108                          switch (m) {
 109  109                          case 0:
 110  110                                  return (PIo4 + tiny);   /* atan(+INF,+INF) */
 111  111                          case 1:
 112  112                                  return (-PIo4 - tiny);  /* atan(-INF,+INF) */
 113  113                          case 2:
 114  114                                  return (PI3o4 + tiny);  /* atan(+INF,-INF) */
 115  115                          case 3:
 116  116                                  return (-PI3o4 - tiny); /* atan(-INF,-INF) */
↓ open down ↓ 3 lines elided ↑ open up ↑
 120  120                          case 0:
 121  121                                  return (zero);  /* atan(+...,+INF) */
 122  122                          case 1:
 123  123                                  return (-zero); /* atan(-...,+INF) */
 124  124                          case 2:
 125  125                                  return (PI + tiny);     /* atan(+...,-INF) */
 126  126                          case 3:
 127  127                                  return (-PI - tiny);    /* atan(-...,-INF) */
 128  128                          }
 129  129                  }
 130      -
      130 +        }
 131  131          /* when y is INF */
 132  132          if (!finitel(y))
 133  133                  return (signy == 1 ? -PIo2 - tiny : PIo2 + tiny);
 134  134  
 135  135          /* compute y/x */
 136  136          x = fabsl(x);
 137  137          y = fabsl(y);
 138  138          t = PI_lo;
 139  139          k = (ilogbl(y) - ilogbl(x));
 140  140  
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX