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 catanl = __catanl
  31 
  32 /* INDENT OFF */
  33 /*
  34  * ldcomplex catanl(ldcomplex z);
  35  *
  36  * Atan(z) return A + Bi where,
  37  *            1
  38  *      A = --- * atan2(2x, 1-x*x-y*y)
  39  *            2
  40  *
  41  *            1      [ x*x + (y+1)*(y+1) ]   1               4y
  42  *       B = --- log [ ----------------- ] = - log (1+ -----------------)
  43  *            4      [ x*x + (y-1)*(y-1) ]   4         x*x + (y-1)*(y-1)
  44  *
  45  *                 2    16  3                         y
  46  *         = t - 2t   + -- t  - ..., where t = -----------------
  47  *                      3                      x*x + (y-1)*(y-1)
  48  * Proof:
  49  * Let w = atan(z=x+yi) = A + B i. Then tan(w) = z.
  50  * Since sin(w) = (exp(iw)-exp(-iw))/(2i), cos(w)=(exp(iw)+exp(-iw))/(2),




  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 __catanl = catanl
  31 
  32 /* INDENT OFF */
  33 /*
  34  * ldcomplex catanl(ldcomplex z);
  35  *
  36  * Atan(z) return A + Bi where,
  37  *            1
  38  *      A = --- * atan2(2x, 1-x*x-y*y)
  39  *            2
  40  *
  41  *            1      [ x*x + (y+1)*(y+1) ]   1               4y
  42  *       B = --- log [ ----------------- ] = - log (1+ -----------------)
  43  *            4      [ x*x + (y-1)*(y-1) ]   4         x*x + (y-1)*(y-1)
  44  *
  45  *                 2    16  3                         y
  46  *         = t - 2t   + -- t  - ..., where t = -----------------
  47  *                      3                      x*x + (y-1)*(y-1)
  48  * Proof:
  49  * Let w = atan(z=x+yi) = A + B i. Then tan(w) = z.
  50  * Since sin(w) = (exp(iw)-exp(-iw))/(2i), cos(w)=(exp(iw)+exp(-iw))/(2),