Average Error: 0.4 → 0.4
Time: 3.7s
Precision: 64
\[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\]
\[3 \cdot \left(y \cdot \sqrt{x}\right) + 3 \cdot \left(\left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right)\]
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
3 \cdot \left(y \cdot \sqrt{x}\right) + 3 \cdot \left(\left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right)
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 * (y * sqrt(x))) + (3.0 * (((1.0 / (x * 9.0)) - 1.0) * sqrt(x))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.4
Target0.4
Herbie0.4
\[3 \cdot \left(y \cdot \sqrt{x} + \left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right)\]

Derivation

  1. Initial program 0.4

    \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\]
  2. Using strategy rm
  3. Applied associate-*l*0.4

    \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\right)}\]
  4. Using strategy rm
  5. Applied associate--l+0.4

    \[\leadsto 3 \cdot \left(\sqrt{x} \cdot \color{blue}{\left(y + \left(\frac{1}{x \cdot 9} - 1\right)\right)}\right)\]
  6. Applied distribute-lft-in0.4

    \[\leadsto 3 \cdot \color{blue}{\left(\sqrt{x} \cdot y + \sqrt{x} \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)}\]
  7. Applied distribute-lft-in0.4

    \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right) + 3 \cdot \left(\sqrt{x} \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)}\]
  8. Simplified0.4

    \[\leadsto \color{blue}{3 \cdot \left(y \cdot \sqrt{x}\right)} + 3 \cdot \left(\sqrt{x} \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)\]
  9. Simplified0.4

    \[\leadsto 3 \cdot \left(y \cdot \sqrt{x}\right) + \color{blue}{3 \cdot \left(\left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right)}\]
  10. Final simplification0.4

    \[\leadsto 3 \cdot \left(y \cdot \sqrt{x}\right) + 3 \cdot \left(\left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right)\]

Reproduce

herbie shell --seed 2020105 +o rules:numerics
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B"
  :precision binary64

  :herbie-target
  (* 3 (+ (* y (sqrt x)) (* (- (/ 1 (* x 9)) 1) (sqrt x))))

  (* (* 3 (sqrt x)) (- (+ y (/ 1 (* x 9))) 1)))