git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git]
/
lib
/
crtdll
/
math
/
tanh.c
1
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
#include <crtdll/math.h>
3
4
double tanh(double x)
5
{
6
if (x > 50)
7
return 1;
8
else if (x < -50)
9
return -1;
10
else
11
{
12
const double ebig = exp(x);
13
const double esmall = 1.0/ebig;
14
return (ebig - esmall) / (ebig + esmall);
15
}
16
}
17