\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)3 \cdot \left(\sqrt{x} \cdot \left(-1 + y\right)\right) + 0.3333333333333333 \cdot {x}^{-0.5}(FPCore (x y) :precision binary64 (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))
(FPCore (x y) :precision binary64 (+ (* 3.0 (* (sqrt x) (+ -1.0 y))) (* 0.3333333333333333 (pow x -0.5))))
double code(double x, double y) {
return (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
double code(double x, double y) {
return (3.0 * (sqrt(x) * (-1.0 + y))) + (0.3333333333333333 * pow(x, -0.5));
}













Bits error versus x













Bits error versus y
Results
| Original | 0.4 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
| Alternative 1 | |
|---|---|
| Error | 0.4 |
| Cost | 13504 |
| Alternative 2 | |
|---|---|
| Error | 0.4 |
| Cost | 7232 |
| Alternative 3 | |
|---|---|
| Error | 0.4 |
| Cost | 7104 |
| Alternative 4 | |
|---|---|
| Error | 11.0 |
| Cost | 7618 |
| Alternative 5 | |
|---|---|
| Error | 26.1 |
| Cost | 6848 |
| Alternative 6 | |
|---|---|
| Error | 42.2 |
| Cost | 6720 |
| Alternative 7 | |
|---|---|
| Error | 42.2 |
| Cost | 6720 |
| Alternative 8 | |
|---|---|
| Error | 60.5 |
| Cost | 385 |
| Alternative 9 | |
|---|---|
| Error | 61.5 |
| Cost | 64 |

Initial program 0.4
Taylor expanded around 0 0.4
Simplified0.4
rmApplied inv-pow_binary64_138030.4
Applied sqrt-pow1_binary64_137360.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2021044
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x))))
(* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))