Average Error: 0.0 → 0.0
Time: 41.7s
Precision: 64
\[\frac{x + y}{x - y}\]
\[\sqrt[3]{\frac{y + x}{x - y} \cdot \left(\frac{y + x}{x - y} \cdot \frac{y + x}{x - y}\right)}\]
\frac{x + y}{x - y}
\sqrt[3]{\frac{y + x}{x - y} \cdot \left(\frac{y + x}{x - y} \cdot \frac{y + x}{x - y}\right)}
double f(double x, double y) {
        double r28422805 = x;
        double r28422806 = y;
        double r28422807 = r28422805 + r28422806;
        double r28422808 = r28422805 - r28422806;
        double r28422809 = r28422807 / r28422808;
        return r28422809;
}

double f(double x, double y) {
        double r28422810 = y;
        double r28422811 = x;
        double r28422812 = r28422810 + r28422811;
        double r28422813 = r28422811 - r28422810;
        double r28422814 = r28422812 / r28422813;
        double r28422815 = r28422814 * r28422814;
        double r28422816 = r28422814 * r28422815;
        double r28422817 = cbrt(r28422816);
        return r28422817;
}

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-cube0.0

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

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

Reproduce

herbie shell --seed 2019158 
(FPCore (x y)
  :name "Linear.Projection:perspective from linear-1.19.1.3, A"

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

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