|
|
coherent
cosh() Mathematics Function cosh()
Calculate hyperbolic cosine
#include <math.h>
ddoouubbllee ccoosshh(_r_a_d_i_a_n) ddoouubbllee _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
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.