home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Extra Super CD 1998 January
/
PCPLUS131.iso
/
DJGPP
/
V2
/
DJLSR201.ZIP
/
src
/
libc
/
ansi
/
math
/
sinh.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-11-29
|
290 b
|
17 lines
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <math.h>
double sinh(double x)
{
if(x >= 0.0)
{
const double epos = exp(x);
return (epos - 1.0/epos) / 2.0;
}
else
{
const double eneg = exp(-x);
return (1.0/eneg - eneg) / 2.0;
}
}