Average Error: 0.0 → 0.0
Time: 14.1s
Precision: 64
\[\frac{x + y}{x - y}\]
\[{\left(\frac{y + x}{x - y} \cdot \frac{y + x}{x - y}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\frac{y + x}{x - y}}\]
\frac{x + y}{x - y}
{\left(\frac{y + x}{x - y} \cdot \frac{y + x}{x - y}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\frac{y + x}{x - y}}
double f(double x, double y) {
        double r20064935 = x;
        double r20064936 = y;
        double r20064937 = r20064935 + r20064936;
        double r20064938 = r20064935 - r20064936;
        double r20064939 = r20064937 / r20064938;
        return r20064939;
}

double f(double x, double y) {
        double r20064940 = y;
        double r20064941 = x;
        double r20064942 = r20064940 + r20064941;
        double r20064943 = r20064941 - r20064940;
        double r20064944 = r20064942 / r20064943;
        double r20064945 = r20064944 * r20064944;
        double r20064946 = 0.3333333333333333;
        double r20064947 = pow(r20064945, r20064946);
        double r20064948 = cbrt(r20064944);
        double r20064949 = r20064947 * r20064948;
        return r20064949;
}

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-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 pow1/331.8

    \[\leadsto \left(\sqrt[3]{\frac{x + y}{x - y}} \cdot \color{blue}{{\left(\frac{x + y}{x - y}\right)}^{\frac{1}{3}}}\right) \cdot \sqrt[3]{\frac{x + y}{x - y}}\]
  6. Applied pow1/331.8

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

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

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

Reproduce

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

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

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