|
|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 213 (0xd5)
Types: TextFile
Notes: UNIX file
Names: »tanh.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
└─⟦f4b8d8c84⟧ UNIX Filesystem
└─⟦this⟧ »libm/tanh.c«
/*
* Hyperbolic tangent.
*/
#include <math.h>
double
tanh(x)
double x;
{
double r;
register int s;
s = 0;
if (x < 0.0) {
x = -x;
s = 1;
}
r = exp(-2.0*x);
r = (1.0-r) / (1.0+r);
return (s?-r:r);
}