

cosh()                 Mathematics Function                cosh()




Calculate hyperbolic cosine

#include <math.h>
ddoouubbllee ccoosshh(_r_a_d_i_a_n) ddoouubbllee _r_a_d_i_a_n;

cosh  calculates the  hyperbolic cosine  of  radian, which  is in
radian measure.

***** Example *****

The  following program  prompts you  for a  number; it  then uses
cosh, sinh,  and tanh  to generate, respectively,  the hyperbolic
cosine, sine, and tangent of your number.


#include <math.h>
#include <stdio.h>
#define display(x) dodisplay((double)(x), #x)



dodisplay(value, name)
double value; char *name;
{
        if (errno)
                perror(name);
        else
                printf("%10g %s\n", value, name);
        errno = 0;
}



main()
{
        extern char *gets();
        double x;
        char string[64];



        for(;;) {
                printf("Enter number: ");
                if(gets(string) == NULL)
                        break;
                x = atof(string);



                display(x);
                display(cosh(x));
                display(sinh(x));
                display(tanh(x));
        }


COHERENT Lexicon                                           Page 1




cosh()                 Mathematics Function                cosh()



}


***** See Also *****

mathematics library

***** Diagnostics *****

When overflow occurs, cosh returns a huge value that has the same
sign as the actual result.














































COHERENT Lexicon                                           Page 2


