forked from KolibriOS/kolibrios
Added git source kolibri-libc and
Configured autobuild git-svn-id: svn://kolibrios.org@8687 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <math.h>
|
||||
|
||||
double tanh(double x)
|
||||
{
|
||||
if (x > 50)
|
||||
return 1;
|
||||
else if (x < -50)
|
||||
return -1;
|
||||
else
|
||||
{
|
||||
const double ebig = exp(x);
|
||||
const double esmall = 1.0/ebig;
|
||||
return (ebig - esmall) / (ebig + esmall);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user