Average Error: 0.0 → 0.1
Time: 4.2s
Precision: 64
\[\frac{x + y}{x - y}\]
\[\left(\sqrt[3]{\frac{x + y}{x - y}} \cdot \sqrt[3]{\sqrt[3]{{\left(\frac{x + y}{x - y}\right)}^{3}}}\right) \cdot \sqrt[3]{\frac{x + y}{x - y}}\]
\frac{x + y}{x - y}
\left(\sqrt[3]{\frac{x + y}{x - y}} \cdot \sqrt[3]{\sqrt[3]{{\left(\frac{x + y}{x - y}\right)}^{3}}}\right) \cdot \sqrt[3]{\frac{x + y}{x - y}}
double f(double x, double y) {
        double r578103 = x;
        double r578104 = y;
        double r578105 = r578103 + r578104;
        double r578106 = r578103 - r578104;
        double r578107 = r578105 / r578106;
        return r578107;
}

double f(double x, double y) {
        double r578108 = x;
        double r578109 = y;
        double r578110 = r578108 + r578109;
        double r578111 = r578108 - r578109;
        double r578112 = r578110 / r578111;
        double r578113 = cbrt(r578112);
        double r578114 = 3.0;
        double r578115 = pow(r578112, r578114);
        double r578116 = cbrt(r578115);
        double r578117 = cbrt(r578116);
        double r578118 = r578113 * r578117;
        double r578119 = r578118 * r578113;
        return r578119;
}

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.1
\[\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 add-cube-cbrt0.1

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

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

    \[\leadsto \left(\sqrt[3]{\frac{x + y}{x - y}} \cdot \sqrt[3]{\frac{\color{blue}{\sqrt[3]{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + y\right)}}}{\sqrt[3]{\left(\left(x - y\right) \cdot \left(x - y\right)\right) \cdot \left(x - y\right)}}}\right) \cdot \sqrt[3]{\frac{x + y}{x - y}}\]
  7. Applied cbrt-undiv42.6

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

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

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

Reproduce

herbie shell --seed 2020039 +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)))