\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 r52000 = 1.0;
double r52001 = x;
double r52002 = r52000 / r52001;
double r52003 = r52001 * r52001;
double r52004 = r52000 - r52003;
double r52005 = sqrt(r52004);
double r52006 = r52005 / r52001;
double r52007 = r52002 + r52006;
double r52008 = log(r52007);
return r52008;
}
double f(double x) {
double r52009 = x;
double r52010 = log(r52009);
double r52011 = -r52010;
double r52012 = 1.0;
double r52013 = r52009 * r52009;
double r52014 = r52012 - r52013;
double r52015 = sqrt(r52014);
double r52016 = r52012 + r52015;
double r52017 = log(r52016);
double r52018 = r52011 + r52017;
return r52018;
}



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