ReactOS 0.4.15-dev-7958-gcd0bb1a
tanh.c
Go to the documentation of this file.
1/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
3#include <math.h>
4
5#ifdef _MSC_VER
6#pragma function(tanh)
7#endif
8
9/*
10 * @implemented
11 */
12double tanh(double x)
13{
14 if (x > 50)
15 return 1;
16 else if (x < -50)
17 return -1;
18 else
19 {
20 const double ebig = exp(x);
21 const double esmall = 1.0/ebig;
22 return (ebig - esmall) / (ebig + esmall);
23 }
24}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
double tanh(double x)
Definition: tanh.c:46
DWORD exp
Definition: msg.c:16058