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








Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Error | 0.0 |
| Cost | 13632 |
| Alternative 2 | |
|---|---|
| Error | 0.0 |
| Cost | 13504 |
| Alternative 3 | |
|---|---|
| Error | 0.3 |
| Cost | 7104 |
| Alternative 4 | |
|---|---|
| Error | 0.6 |
| Cost | 6848 |
| Alternative 5 | |
|---|---|
| Error | 55.0 |
| Cost | 64 |

Initial program 0.0
rmApplied *-un-lft-identity_binary64_21240.0
Applied add-sqr-sqrt_binary64_21460.0
Applied difference-of-squares_binary64_20930.0
Applied sqrt-prod_binary64_21400.0
Applied times-frac_binary64_21300.0
Simplified0.0
Simplified0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021044
(FPCore (x)
:name "Hyperbolic arc-(co)secant"
:precision binary64
(log (+ (/ 1.0 x) (/ (sqrt (- 1.0 (* x x))) x))))