\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\left(-\log x\right) + \log \left(1 + \sqrt{1 - x \cdot x}\right)double f(double x) {
double r37697 = 1.0;
double r37698 = x;
double r37699 = r37697 / r37698;
double r37700 = r37698 * r37698;
double r37701 = r37697 - r37700;
double r37702 = sqrt(r37701);
double r37703 = r37702 / r37698;
double r37704 = r37699 + r37703;
double r37705 = log(r37704);
return r37705;
}
double f(double x) {
double r37706 = x;
double r37707 = log(r37706);
double r37708 = -r37707;
double r37709 = 1.0;
double r37710 = r37706 * r37706;
double r37711 = r37709 - r37710;
double r37712 = sqrt(r37711);
double r37713 = r37709 + r37712;
double r37714 = log(r37713);
double r37715 = r37708 + r37714;
return r37715;
}



Bits error versus x
Results
Initial program 0.1
rmApplied div-inv0.1
Applied div-inv0.1
Applied distribute-rgt-out0.1
Applied log-prod0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019323 +o rules:numerics
(FPCore (x)
:name "Hyperbolic arc-(co)secant"
:precision binary64
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))