\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 r60869 = 1.0;
double r60870 = x;
double r60871 = r60869 / r60870;
double r60872 = r60870 * r60870;
double r60873 = r60869 - r60872;
double r60874 = sqrt(r60873);
double r60875 = r60874 / r60870;
double r60876 = r60871 + r60875;
double r60877 = log(r60876);
return r60877;
}
double f(double x) {
double r60878 = x;
double r60879 = log(r60878);
double r60880 = -r60879;
double r60881 = 1.0;
double r60882 = r60878 * r60878;
double r60883 = r60881 - r60882;
double r60884 = sqrt(r60883);
double r60885 = r60881 + r60884;
double r60886 = log(r60885);
double r60887 = r60880 + r60886;
return r60887;
}



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))))