Print this page
5261 libm should stop using synonyms.h


  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 tanhl = __tanhl
  31 
  32 /*
  33  * tanhl(x) returns the hyperbolic tangent of x
  34  *
  35  * Method :
  36  *      1. reduce x to non-negative:  tanhl(-x) = - tanhl(x).
  37  *      2.
  38  *        0      <  x <=  small    :  tanhl(x) := x
  39  *                                                -expm1l(-2x)
  40  *        small  <  x <=  1        :  tanhl(x) := --------------
  41  *                                               expm1l(-2x) + 2
  42  *                                                        2
  43  *        1      <= x <= threshold :  tanhl(x) := 1 -  ---------------
  44  *                                                    expm1l(2x) + 2
  45  *     threshold <  x <= INF       :  tanhl(x) := 1.
  46  *
  47  * where
  48  *      single :        small = 1.e-5           threshold = 11.0
  49  *      double :        small = 1.e-10          threshold = 22.0
  50  *      quad   :        small = 1.e-20          threshold = 45.0




  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 __tanhl = tanhl
  31 
  32 /*
  33  * tanhl(x) returns the hyperbolic tangent of x
  34  *
  35  * Method :
  36  *      1. reduce x to non-negative:  tanhl(-x) = - tanhl(x).
  37  *      2.
  38  *        0      <  x <=  small    :  tanhl(x) := x
  39  *                                                -expm1l(-2x)
  40  *        small  <  x <=  1        :  tanhl(x) := --------------
  41  *                                               expm1l(-2x) + 2
  42  *                                                        2
  43  *        1      <= x <= threshold :  tanhl(x) := 1 -  ---------------
  44  *                                                    expm1l(2x) + 2
  45  *     threshold <  x <= INF       :  tanhl(x) := 1.
  46  *
  47  * where
  48  *      single :        small = 1.e-5           threshold = 11.0
  49  *      double :        small = 1.e-10          threshold = 22.0
  50  *      quad   :        small = 1.e-20          threshold = 45.0