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

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. Simplified0.4

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

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

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

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

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

    \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} + \color{blue}{\left(\sqrt{x} \cdot \left(y + -1\right)\right) \cdot 3}\]
  10. Using strategy rm
  11. Applied clear-num_binary640.4

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

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

Reproduce

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