Average Error: 0.0 → 0.0
Time: 2.3s
Precision: 64
\[\frac{x + y}{x - y}\]
\[\sqrt[3]{{\left(\frac{x}{x - y}\right)}^{3}} + \frac{y}{x - y}\]
\frac{x + y}{x - y}
\sqrt[3]{{\left(\frac{x}{x - y}\right)}^{3}} + \frac{y}{x - y}
double f(double x, double y) {
        double r704573 = x;
        double r704574 = y;
        double r704575 = r704573 + r704574;
        double r704576 = r704573 - r704574;
        double r704577 = r704575 / r704576;
        return r704577;
}

double f(double x, double y) {
        double r704578 = x;
        double r704579 = y;
        double r704580 = r704578 - r704579;
        double r704581 = r704578 / r704580;
        double r704582 = 3.0;
        double r704583 = pow(r704581, r704582);
        double r704584 = cbrt(r704583);
        double r704585 = r704579 / r704580;
        double r704586 = r704584 + r704585;
        return r704586;
}

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.0
Target0.0
Herbie0.0
\[\frac{1}{\frac{x}{x + y} - \frac{y}{x + y}}\]

Derivation

  1. Initial program 0.0

    \[\frac{x + y}{x - y}\]
  2. Using strategy rm
  3. Applied flip--31.2

    \[\leadsto \frac{x + y}{\color{blue}{\frac{x \cdot x - y \cdot y}{x + y}}}\]
  4. Applied associate-/r/31.3

    \[\leadsto \color{blue}{\frac{x + y}{x \cdot x - y \cdot y} \cdot \left(x + y\right)}\]
  5. Simplified0.2

    \[\leadsto \color{blue}{\frac{1}{x - y}} \cdot \left(x + y\right)\]
  6. Using strategy rm
  7. Applied distribute-lft-in0.2

    \[\leadsto \color{blue}{\frac{1}{x - y} \cdot x + \frac{1}{x - y} \cdot y}\]
  8. Simplified0.1

    \[\leadsto \color{blue}{\frac{x}{x - y}} + \frac{1}{x - y} \cdot y\]
  9. Simplified0.0

    \[\leadsto \frac{x}{x - y} + \color{blue}{\frac{y}{x - y}}\]
  10. Using strategy rm
  11. Applied add-cbrt-cube23.9

    \[\leadsto \frac{x}{\color{blue}{\sqrt[3]{\left(\left(x - y\right) \cdot \left(x - y\right)\right) \cdot \left(x - y\right)}}} + \frac{y}{x - y}\]
  12. Applied add-cbrt-cube27.9

    \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(x \cdot x\right) \cdot x}}}{\sqrt[3]{\left(\left(x - y\right) \cdot \left(x - y\right)\right) \cdot \left(x - y\right)}} + \frac{y}{x - y}\]
  13. Applied cbrt-undiv27.9

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

    \[\leadsto \sqrt[3]{\color{blue}{{\left(\frac{x}{x - y}\right)}^{3}}} + \frac{y}{x - y}\]
  15. Final simplification0.0

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

Reproduce

herbie shell --seed 2020060 +o rules:numerics
(FPCore (x y)
  :name "Linear.Projection:perspective from linear-1.19.1.3, A"
  :precision binary64

  :herbie-target
  (/ 1 (- (/ x (+ x y)) (/ y (+ x y))))

  (/ (+ x y) (- x y)))