Print this page
11210 libm should be cstyle(1ONBLD) clean

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/complex/cacoshl.c
          +++ new/usr/src/lib/libm/common/complex/cacoshl.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24   24   */
       25 +
  25   26  /*
  26   27   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27   28   * Use is subject to license terms.
  28   29   */
  29   30  
  30   31  #pragma weak __cacoshl = cacoshl
  31   32  
  32      -#include "libm.h"       /* fabsl/isnanl/isinfl/signbitl */
       33 +#include "libm.h"                       /* fabsl/isnanl/isinfl/signbitl */
  33   34  #include "complex_wrapper.h"
  34   35  #include "longdouble.h"
  35   36  
  36      -/* INDENT OFF */
       37 +
  37   38  /*
  38   39   * ldcomplex cacoshl(ldcomplex z);
  39   40   *      cacosh z = +-i cacos z .
  40   41   * In order to make conj(cacosh(z))=cacosh(conj(z)),
  41   42   * we define
  42   43   *      cacosh z = sign(Im(z))*i cacos z .
  43   44   *
  44   45   */
  45      -/* INDENT ON */
  46   46  
  47   47  ldcomplex
  48      -cacoshl(ldcomplex z) {
       48 +cacoshl(ldcomplex z)
       49 +{
  49   50          ldcomplex w, ans;
  50   51          long double x, y;
  51   52  
  52   53          w = cacosl(z);
  53   54          x = LD_RE(z);
  54   55          y = LD_IM(z);
       56 +
  55   57          if (isnanl(y)) {
  56   58                  LD_IM(ans) = y + y;
       59 +
  57   60                  if (isinfl(x))
  58   61                          LD_RE(ans) = fabsl(x);
  59   62                  else
  60   63                          LD_RE(ans) = y;
  61   64          } else if (signbitl(y) == 0) {
  62   65                  LD_RE(ans) = -LD_IM(w);
  63   66                  LD_IM(ans) = LD_RE(w);
  64   67          } else {
  65   68                  LD_RE(ans) = LD_IM(w);
  66   69                  LD_IM(ans) = -LD_RE(w);
  67   70          }
       71 +
  68   72          return (ans);
  69   73  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX