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) (2.0 * ((double) log(1.0)))) + ((double) (((double) (2.0 * x)) + ((double) (((double) pow(x, 3.0)) * 0.6666666666666665))))))));
}



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