00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #if defined(LIBM_SCCS) && !defined(lint)
00014 static char rcsid[] = "$NetBSD: w_atanh.c,v 1.6 1995/05/10 20:48:43 jtc Exp $";
00015 #endif
00016 
00017 
00018 
00019 
00020 
00021 #include "math.h"
00022 #include "mathP.h"
00023 
00024 
00025 #ifdef __STDC__
00026     double atanh(double x)      
00027 #else
00028     double atanh(x)         
00029     double x;
00030 #endif
00031 {
00032 #ifdef _IEEE_LIBM
00033     return __ieee754_atanh(x);
00034 #else
00035     double z,y;
00036     z = __ieee754_atanh(x);
00037     if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
00038     y = fabs(x);
00039     if(y>=1.0) {
00040         if(y>1.0)
00041             return __kernel_standard(x,x,30); 
00042         else 
00043             return __kernel_standard(x,x,31); 
00044     } else
00045         return z;
00046 #endif
00047 }