Average Error: 0.4 → 0.4
Time: 5.6s
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{\frac{1}{9}}{x} + y\right) + 3 \cdot \left(-1\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{\frac{1}{9}}{x} + y\right) + 3 \cdot \left(-1\right)\right) \cdot \sqrt{x}
double f(double x, double y) {
        double r543716 = 3.0;
        double r543717 = x;
        double r543718 = sqrt(r543717);
        double r543719 = r543716 * r543718;
        double r543720 = y;
        double r543721 = 1.0;
        double r543722 = 9.0;
        double r543723 = r543717 * r543722;
        double r543724 = r543721 / r543723;
        double r543725 = r543720 + r543724;
        double r543726 = r543725 - r543721;
        double r543727 = r543719 * r543726;
        return r543727;
}

double f(double x, double y) {
        double r543728 = 3.0;
        double r543729 = 1.0;
        double r543730 = 9.0;
        double r543731 = r543729 / r543730;
        double r543732 = x;
        double r543733 = r543731 / r543732;
        double r543734 = y;
        double r543735 = r543733 + r543734;
        double r543736 = r543728 * r543735;
        double r543737 = -r543729;
        double r543738 = r543728 * r543737;
        double r543739 = r543736 + r543738;
        double r543740 = sqrt(r543732);
        double r543741 = r543739 * r543740;
        return r543741;
}

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 add-sqr-sqrt0.4

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

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

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

    \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \sqrt{\frac{1}{x \cdot 9}} \cdot \color{blue}{\left(\sqrt{\frac{\sqrt{1}}{x}} \cdot \sqrt{\frac{\sqrt{1}}{9}}\right)}\right) - 1\right)\]
  8. Applied add-sqr-sqrt0.5

    \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \sqrt{\frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{x \cdot 9}} \cdot \left(\sqrt{\frac{\sqrt{1}}{x}} \cdot \sqrt{\frac{\sqrt{1}}{9}}\right)\right) - 1\right)\]
  9. Applied times-frac0.5

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

    \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \color{blue}{\left(\sqrt{\frac{\sqrt{1}}{x}} \cdot \sqrt{\frac{\sqrt{1}}{9}}\right)} \cdot \left(\sqrt{\frac{\sqrt{1}}{x}} \cdot \sqrt{\frac{\sqrt{1}}{9}}\right)\right) - 1\right)\]
  11. Applied swap-sqr0.5

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

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

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

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

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

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

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

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

    \[\leadsto {\color{blue}{\left(\left(3 \cdot \left(\left(\frac{\frac{1}{9}}{x} + y\right) - 1\right)\right) \cdot \sqrt{x}\right)}}^{1}\]
  21. Using strategy rm
  22. Applied sub-neg0.4

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

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

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

Reproduce

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