Average Error: 0.0 → 0.0
Time: 4.1s
Precision: 64
\[\frac{x + y}{x - y}\]
\[\sqrt[3]{\frac{x + y}{x - y}} \cdot \sqrt[3]{\left(\sqrt[3]{\left(\frac{x + y}{x - y} \cdot \frac{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}\right) \cdot \frac{\sqrt[3]{x + y}}{\sqrt[3]{x - y}}} \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}\right) \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}}\]
\frac{x + y}{x - y}
\sqrt[3]{\frac{x + y}{x - y}} \cdot \sqrt[3]{\left(\sqrt[3]{\left(\frac{x + y}{x - y} \cdot \frac{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}\right) \cdot \frac{\sqrt[3]{x + y}}{\sqrt[3]{x - y}}} \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}\right) \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}}
double f(double x, double y) {
        double r416988 = x;
        double r416989 = y;
        double r416990 = r416988 + r416989;
        double r416991 = r416988 - r416989;
        double r416992 = r416990 / r416991;
        return r416992;
}

double f(double x, double y) {
        double r416993 = x;
        double r416994 = y;
        double r416995 = r416993 + r416994;
        double r416996 = r416993 - r416994;
        double r416997 = r416995 / r416996;
        double r416998 = cbrt(r416997);
        double r416999 = cbrt(r416995);
        double r417000 = r416999 * r416999;
        double r417001 = cbrt(r416996);
        double r417002 = r417001 * r417001;
        double r417003 = r417000 / r417002;
        double r417004 = r416997 * r417003;
        double r417005 = r416999 / r417001;
        double r417006 = r417004 * r417005;
        double r417007 = cbrt(r417006);
        double r417008 = r416997 * r416997;
        double r417009 = cbrt(r417008);
        double r417010 = r417007 * r417009;
        double r417011 = r417010 * r417009;
        double r417012 = cbrt(r417011);
        double r417013 = r416998 * r417012;
        return r417013;
}

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 add-cbrt-cube41.6

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

    \[\leadsto \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)}}\]
  5. Applied cbrt-undiv42.4

    \[\leadsto \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)}}}\]
  6. Simplified0.0

    \[\leadsto \sqrt[3]{\color{blue}{{\left(\frac{x + y}{x - y}\right)}^{3}}}\]
  7. Using strategy rm
  8. Applied cube-mult0.0

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

    \[\leadsto \color{blue}{\sqrt[3]{\frac{x + y}{x - y}} \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}}\]
  10. Using strategy rm
  11. Applied add-cube-cbrt0.0

    \[\leadsto \sqrt[3]{\frac{x + y}{x - y}} \cdot \sqrt[3]{\color{blue}{\left(\sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}} \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}\right) \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}}}\]
  12. Using strategy rm
  13. Applied add-cube-cbrt0.0

    \[\leadsto \sqrt[3]{\frac{x + y}{x - y}} \cdot \sqrt[3]{\left(\sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{\color{blue}{\left(\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}\right) \cdot \sqrt[3]{x - y}}}} \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}\right) \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}}\]
  14. Applied add-cube-cbrt0.1

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

    \[\leadsto \sqrt[3]{\frac{x + y}{x - y}} \cdot \sqrt[3]{\left(\sqrt[3]{\frac{x + y}{x - y} \cdot \color{blue}{\left(\frac{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}} \cdot \frac{\sqrt[3]{x + y}}{\sqrt[3]{x - y}}\right)}} \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}\right) \cdot \sqrt[3]{\frac{x + y}{x - y} \cdot \frac{x + y}{x - y}}}\]
  16. Applied associate-*r*0.0

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

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

Reproduce

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