\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\sqrt{e^{x} + 1}(FPCore (x) :precision binary64 (sqrt (/ (- (exp (* 2.0 x)) 1.0) (- (exp x) 1.0))))
(FPCore (x) :precision binary64 (sqrt (+ (exp x) 1.0)))
double code(double x) {
return sqrt((exp(2.0 * x) - 1.0) / (exp(x) - 1.0));
}
double code(double x) {
return sqrt(exp(x) + 1.0);
}






Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Error | 0.7 |
| Cost | 6913 |
| Alternative 2 | |
|---|---|
| Error | 1.1 |
| Cost | 6785 |
| Alternative 3 | |
|---|---|
| Error | 34.0 |
| Cost | 64 |


Initial program 41.0
Simplified0.0
rmApplied *-un-lft-identity_binary640.0
Applied sqrt-prod_binary640.0
Simplified0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021040
(FPCore (x)
:name "sqrtexp (problem 3.4.4)"
:precision binary64
(sqrt (/ (- (exp (* 2.0 x)) 1.0) (- (exp x) 1.0))))