\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\left(3 \cdot \left(\left(\frac{\frac{1}{9}}{x} + y\right) - 1\right)\right) \cdot \sqrt{x}double code(double x, double y) {
return ((double) (((double) (3.0 * ((double) sqrt(x)))) * ((double) (((double) (y + ((double) (1.0 / ((double) (x * 9.0)))))) - 1.0))));
}
double code(double x, double y) {
return ((double) (((double) (3.0 * ((double) (((double) (((double) (((double) (1.0 / 9.0)) / x)) + y)) - 1.0)))) * ((double) sqrt(x))));
}




Bits error versus x




Bits error versus y
Results
| Original | 0.4 |
|---|---|
| Target | 0.4 |
| Herbie | 0.5 |
Initial program 0.4
rmApplied *-un-lft-identity0.4
Applied times-frac0.4
rmApplied pow10.4
Applied pow10.4
Applied pow10.4
Applied pow-prod-down0.4
Applied pow-prod-down0.4
Simplified0.5
Final simplification0.5
herbie shell --seed 2020173
(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)))