\frac{6 \cdot \left(x - 1\right)}{\left(x + 1\right) + 4 \cdot \sqrt{x}}\log \left({\left(e^{\frac{-1 + x}{\left(x + 1\right) + 4 \cdot \sqrt{x}}}\right)}^{6}\right)(FPCore (x) :precision binary64 (/ (* 6.0 (- x 1.0)) (+ (+ x 1.0) (* 4.0 (sqrt x)))))
(FPCore (x) :precision binary64 (log (pow (exp (/ (+ -1.0 x) (+ (+ x 1.0) (* 4.0 (sqrt x))))) 6.0)))
double code(double x) {
return (6.0 * (x - 1.0)) / ((x + 1.0) + (4.0 * sqrt(x)));
}
double code(double x) {
return log(pow(exp((-1.0 + x) / ((x + 1.0) + (4.0 * sqrt(x)))), 6.0));
}




Bits error versus x
Results
| Original | 0.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.2
rmApplied *-un-lft-identity_binary64_222430.2
Applied times-frac_binary64_222490.0
Simplified0.0
rmApplied add-log-exp_binary64_222820.0
Simplified0.1
Final simplification0.1
herbie shell --seed 2021044
(FPCore (x)
:name "Data.Approximate.Numerics:blog from approximate-0.2.2.1"
:precision binary64
:herbie-target
(/ 6.0 (/ (+ (+ x 1.0) (* 4.0 (sqrt x))) (- x 1.0)))
(/ (* 6.0 (- x 1.0)) (+ (+ x 1.0) (* 4.0 (sqrt x)))))