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