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>


  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #pragma weak atanhl = __atanhl
  31 
  32 #include "libm.h"
  33 #include "libm_synonyms.h"
  34 
  35 #define GENERIC long double
  36 #define ATANH   atanhl
  37 
  38 /* ATANH(x)
  39  *                  1              2x                          x
  40  *      ATANH(x) = --- * LOG(1 + -------) = 0.5 * LOG1P(2 * --------)
  41  *                  2             1 - x                      1 - x
  42  * Note: to guarantee ATANH(-x) = -ATANH(x), we use
  43  *                 sign(x)             |x|  
  44  *      ATANH(x) = ------- * LOG1P(2*-------).
  45  *                    2              1 - |x|
  46  *
  47  * Special cases:
  48  *      ATANH(x) is NaN if |x| > 1 with signal;
  49  *      ATANH(NaN) is that NaN with no signal;
  50  *      ATANH(+-1) is +-INF with signal.
  51  *
  52  */
  53 




  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #pragma weak __atanhl = atanhl
  31 
  32 #include "libm.h"

  33 
  34 #define GENERIC long double
  35 #define ATANH   atanhl
  36 
  37 /* ATANH(x)
  38  *                  1              2x                          x
  39  *      ATANH(x) = --- * LOG(1 + -------) = 0.5 * LOG1P(2 * --------)
  40  *                  2             1 - x                      1 - x
  41  * Note: to guarantee ATANH(-x) = -ATANH(x), we use
  42  *                 sign(x)             |x|
  43  *      ATANH(x) = ------- * LOG1P(2*-------).
  44  *                    2              1 - |x|
  45  *
  46  * Special cases:
  47  *      ATANH(x) is NaN if |x| > 1 with signal;
  48  *      ATANH(NaN) is that NaN with no signal;
  49  *      ATANH(+-1) is +-INF with signal.
  50  *
  51  */
  52