Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/C/_SVID_error.c
          +++ new/usr/src/lib/libm/common/C/_SVID_error.c
↓ open down ↓ 114 lines elided ↑ open up ↑
 115  115  #define PI_RZ   C[1].d
 116  116  
 117  117  #define __HI(x) ((unsigned *)&x)[HIWORD]
 118  118  #define __LO(x) ((unsigned *)&x)[LOWORD]
 119  119  #undef  Inf
 120  120  #define Inf     HUGE_VAL
 121  121  
 122  122  double
 123  123  _SVID_libm_err(double x, double y, int type) {
 124  124          struct exception        exc;
 125      -        double                  t, w, ieee_retval;
      125 +        double                  t, w, ieee_retval = 0;
 126  126          enum version            lib_version = _lib_version;
 127  127          int                     iy;
 128  128  
 129  129          /* force libm_ieee behavior in SUSv3 mode */
 130  130          if ((__xpg6 & _C99SUSv3_math_errexcept) != 0)
 131  131                  lib_version = libm_ieee;
 132  132          if (lib_version == c_issue_4) {
 133  133                  (void) fflush(stdout);
 134  134          }
 135  135          exc.arg1 = x;
↓ open down ↓ 713 lines elided ↑ open up ↑
 849  849          case 42:
 850  850                  /* pow(NaN,0.0) */
 851  851                  /* error if lib_version == c_issue_4 or ansi_1 */
 852  852                  exc.type = DOMAIN;
 853  853                  exc.name = "pow";
 854  854                  exc.retval = x;
 855  855                  ieee_retval = 1.0;
 856  856                  if (lib_version == strict_ansi) {
 857  857                          exc.retval = 1.0;
 858  858                  } else if (!matherr(&exc)) {
 859      -                        switch (lib_version) {
 860      -                        case c_issue_4:
 861      -                        case ansi_1:
      859 +                        if ((lib_version == c_issue_4) || (lib_version == ansi_1))
 862  860                                  errno = EDOM;
 863      -                        }
 864  861                  }
 865  862                  break;
 866  863          case 43:
 867  864                  /* log1p(-1) */
 868  865                  exc.type = SING;
 869  866                  exc.name = "log1p";
 870  867                  ieee_retval = setexception(0, -1.0);
 871  868                  if (lib_version == c_issue_4)
 872  869                          exc.retval = -HUGE;
 873  870                  else
↓ open down ↓ 106 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX