/**************************************************************************/
/*                                                                        */
/*                                 Sources                                */
/*                                from  the                               */
/*                           XSC SOFTWARE PACKAGE                         */
/*                                                                        */
/*                Copyright (c) 1997 University of Karlsruhe              */
/*                     Institute for Appl. Mathematics                    */
/*                                                                        */
/* This program is free software for non-commercial use. For details, see */
/* the file LICENSE.XSC, distributed with this software package.          */
/*                                                                        */
/* This program is distributed WITHOUT ANY WARRANTY. For details, see the */
/* file LICENSE.XSC, distributed with this software package.              */
/*                                                                        */
/**************************************************************************/

/* RCS $Id: l_acsh.c,v 1.2 1997/09/25 17:32:15 ae59 Exp $ */
/*
$Log: l_acsh.c,v $
 * Revision 1.2  1997/09/25  17:32:15  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:23:08  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : l_acsh.c                              */
/*                                                              */
/*      Entries         : multiprecision l_acsh(a)              */
/*                        multiprecision a;                     */
/*                                                              */
/*      Arguments       : a = argument of standard function     */
/*                                                              */
/*      Description     : Inverse hyperbolic cosine function    */
/*                                                              */
/*      Date            : 1991-02-21                            */
/*      1991-02-21 : extern L...() declaration removed          */
/*      1990-11-16 : E_TPUSH+E_TPOPP / consider temporary flag  */
/*      1990-08-06 : explicit compare/rc type changed to a_intg */
/****************************************************************/

#ifndef ALL_IN_ONE
#ifdef AIX
#include "/u/p88c/runtime/o_defs.h"
#else
#include "o_defs.h"
#endif
#define local
#endif

#ifdef LINT_ARGS
local multiprecision l_acsh(multiprecision a)
#else
local multiprecision l_acsh(a)

multiprecision a;
#endif
        {
        multiprecision res;
        a_intg rc;

        E_TPUSH("l_acsh")

        l_init(&res);
        if (res==NULL)
           e_trap(ALLOCATION,2,E_TMSG,65);
        else if ((rc = Larcosh(a,res))!=0) {
           e_trap(INV_ARG,4,E_TMLT+E_TEXT(7),&a,E_TINT+E_TEXT(16),&rc);
           (void)b_bclr(res);
           }

        if (a->f) l_free(&a);

        E_TPOPP("l_acsh")
        return(res);
        }
