\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\frac{1}{2} \cdot \left(0.66666666666666652 \cdot {x}^{3} + \left(2 \cdot \log 1 + 2 \cdot x\right)\right)double code(double x) {
return ((double) (((double) (1.0 / 2.0)) * ((double) log(((double) (((double) (1.0 + x)) / ((double) (1.0 - x))))))));
}
double code(double x) {
return ((double) (((double) (1.0 / 2.0)) * ((double) (((double) (0.6666666666666665 * ((double) pow(x, 3.0)))) + ((double) (((double) (2.0 * ((double) log(1.0)))) + ((double) (2.0 * x))))))));
}



Bits error versus x
Results
Initial program 58.6
rmApplied flip3--58.6
Applied associate-/r/58.6
Applied log-prod58.6
Taylor expanded around 0 0.3
Taylor expanded around 0 0.3
Final simplification0.3
herbie shell --seed 2020161
(FPCore (x)
:name "Hyperbolic arc-(co)tangent"
:precision binary64
(* (/ 1.0 2.0) (log (/ (+ 1.0 x) (- 1.0 x)))))