\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\left(\log \left(1 + \sqrt{1 - x \cdot x}\right) - \log x\right) - \log 1(FPCore (x) :precision binary64 (log (+ (/ 1.0 x) (/ (sqrt (- 1.0 (* x x))) x))))
(FPCore (x) :precision binary64 (- (- (log (+ 1.0 (sqrt (- 1.0 (* x x))))) (log x)) (log 1.0)))
double code(double x) {
return log((1.0 / x) + (sqrt(1.0 - (x * x)) / x));
}
double code(double x) {
return (log(1.0 + sqrt(1.0 - (x * x))) - log(x)) - log(1.0);
}






Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Accuracy | 0.0 |
| Cost | 960 |
| Alternative 2 | |
|---|---|
| Accuracy | 0.4 |
| Cost | 1088 |
| Alternative 3 | |
|---|---|
| Accuracy | 64.0 |
| Cost | 1216 |
Initial program 0.0
rmApplied div-inv_binary64_10980.0
Applied div-inv_binary64_10980.0
Applied distribute-rgt-out_binary64_10540.0
Applied log-prod_binary64_11870.2
Simplified0.2
rmApplied *-un-lft-identity_binary64_11010.2
Applied log-prod_binary64_11870.2
Applied distribute-neg-in_binary64_10620.2
Applied associate-+l+_binary64_10340.2
Simplified0.2
rmApplied pow1_binary64_11620.2
Final simplification0.2
herbie shell --seed 2020322
(FPCore (x)
:name "Hyperbolic arc-(co)secant"
:precision binary64
(log (+ (/ 1.0 x) (/ (sqrt (- 1.0 (* x x))) x))))