Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tanh(3M) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

isinf(3M)

isnan(3M)

matherr(3M)

sinh(3M)

NAME

sinh(), cosh(), tanh(), sinhf(), coshf(), tanhf() − hyperbolic functions

SYNOPSIS

#include <math.h>

double sinh(double x);

double cosh(double x);

double tanh(double x);

float sinhf(float x);

float coshf(float x);

float tanhf(float x);

DESCRIPTION

sinh(), cosh(), and tanh() return respectively the hyberbolic sine, cosine, and tangent of their argument. 

When x is ±INFINITY, sinh() returns ±INFINITY respectively. 

When x is ±INFINITY, cosh() returns +INFINITY. 

When x is ±INFINITY, tanh() returns ±1.0 respectively. 

sinhf(), coshf(), and tanhf() are float versions of these functions.  Their performance is significantly faster than that of the double versions.  Programs must be compiled in ANSI mode (use the -Aa option) in order to use these functions; otherwise, the compiler promotes the float arguments to double, and the functions return incorrect results. 

DEPENDENCIES

Series 300/400

sinhf(), coshf(), and tanhf() are not supported on Series 300/400 systems. 

Series 700/800

sinhf(), coshf(), and tanhf() are not specified by any standard (they are, however, named in accordance with the conventions specified in the "Future Library Directions" section of the ANSI C standard).  They are provided in the PA1.1 versions of the math library only.  The +DA1.1 option (the default on Series 700 systems) links in a PA1.1 version automatically.  A PA1.1 library can be linked in explicitly.  For more information, see the HP-UX Floating-Point Guide.

ERRORS

/lib/libm.a

sinh() and cosh() return HUGE_VAL (and sinh() may return −HUGE_VAL for negative x) and set errno to ERANGE when the correct value would overflow. 

sinh(), cosh() and tanh() return NaN and set errno to EDOM when x is NaN.  In addition, a message indicating DOMAIN error is printed on the standard error output. 

These error-handling procedures can be changed with the matherr() function (see matherr(3M)).

/lib/libM.a

No error messages are printed on the standard error output. 

sinh() and cosh() return HUGE_VAL (and sinh() may return −HUGE_VAL for negative x) and set errno to ERANGE when the correct value would overflow. 

sinh(), cosh() and tanh() return NaN and set errno to EDOM when x is NaN. 

These error-handling procedures can be changed by using the _matherr() function (see _matherr(3M)). Note that _matherr() is provided in order to assist in migrating programs from libm.a to libM.a and is not a part of XPG3, ANSI C, or POSIX. 

SEE ALSO

isinf(3M), isnan(3M), matherr(3M). 

STANDARDS CONFORMANCE

sinh() in libm.a: AES, SVID2, XPG2, XPG3, FIPS 151-2, POSIX.1
sinh() in libM.a: AES, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C

cosh() in libm.a: AES, SVID2, XPG2, XPG3, FIPS 151-2, POSIX.1
cosh() in libM.a: AES, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C

tanh() in libm.a: AES, SVID2, XPG2, XPG3, FIPS 151-2, POSIX.1
tanh() in libM.a: AES, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026