Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-21
creat (supplementary)
cosh
The cosh function computes the hyperbolic cosine of its argument.
expr
is an expression of type double.
Return Value
is the hyperbolic cosine of expr, expressed as a double value. If the computation
causes an overflow, cosh returns the value HUGE_VAL.
Usage Guidelines
•
If expr has too great a magnitude, cosh sets errno to ERANGE (a range error).
Example
This example prints “The hyperbolic cosine is 1.543081.”
#include <mathh>
#include <stdioh>
int main(void)
{
double r, x;
x = -1.0;
r = cosh(x);
printf ("The hyperbolic cosine is %f.", r);
}
creat (supplementary)
The creat function creates a new C binary file or erases all data from an existing C
binary file and then opens the file for alternate I/O and write-only access.
fname
points to a string containing a valid file name.
#include <mathh>
double cosh(double expr);
#include <fcntlh>
int creat(char *fname, [int security], [int pext],
[int sext]);