Average Error: 0.4 → 0.4
Time: 3.5s
Precision: 64
\[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\]
\[\left(3 \cdot \left(\frac{0.1111111111111111}{x} + \left(y - 1\right)\right)\right) \cdot \sqrt{x}\]
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\left(3 \cdot \left(\frac{0.1111111111111111}{x} + \left(y - 1\right)\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) (0.1111111111111111 / x)) + ((double) (y - 1.0)))))) * ((double) 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. Taylor expanded around 0 0.4

    \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(y + 0.1111111111111111 \cdot \frac{1}{x}\right)} - 1\right)\]
  3. Using strategy rm
  4. Applied pow10.4

    \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{{\left(\left(y + 0.1111111111111111 \cdot \frac{1}{x}\right) - 1\right)}^{1}}\]
  5. Applied pow10.4

    \[\leadsto \left(3 \cdot \color{blue}{{\left(\sqrt{x}\right)}^{1}}\right) \cdot {\left(\left(y + 0.1111111111111111 \cdot \frac{1}{x}\right) - 1\right)}^{1}\]
  6. Applied pow10.4

    \[\leadsto \left(\color{blue}{{3}^{1}} \cdot {\left(\sqrt{x}\right)}^{1}\right) \cdot {\left(\left(y + 0.1111111111111111 \cdot \frac{1}{x}\right) - 1\right)}^{1}\]
  7. Applied pow-prod-down0.4

    \[\leadsto \color{blue}{{\left(3 \cdot \sqrt{x}\right)}^{1}} \cdot {\left(\left(y + 0.1111111111111111 \cdot \frac{1}{x}\right) - 1\right)}^{1}\]
  8. Applied pow-prod-down0.4

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

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

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

Reproduce

herbie shell --seed 2020129 
(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)))