1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 7 #include <math.h> 8 atanhf(float x)9float atanhf(float x) 10 { 11 if (x > 1 || x < -1) 12 return NAN; 13 if (-1e-6 < x && x < 1e-6) 14 return x + x*x*x/3; 15 else 16 return (logf(1 + x) - logf(1 - x)) / 2; 17 } 18