Average Error: 0.0 → 1.3
Time: 13.7s
Precision: 64
\[\frac{x - y}{2 - \left(x + y\right)}\]
\[\frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{\frac{2 - \left(x + y\right)}{\sqrt[3]{x - y}}}\]
\frac{x - y}{2 - \left(x + y\right)}
\frac{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}{\frac{2 - \left(x + y\right)}{\sqrt[3]{x - y}}}
double f(double x, double y) {
        double r518842 = x;
        double r518843 = y;
        double r518844 = r518842 - r518843;
        double r518845 = 2.0;
        double r518846 = r518842 + r518843;
        double r518847 = r518845 - r518846;
        double r518848 = r518844 / r518847;
        return r518848;
}

double f(double x, double y) {
        double r518849 = x;
        double r518850 = y;
        double r518851 = r518849 - r518850;
        double r518852 = cbrt(r518851);
        double r518853 = r518852 * r518852;
        double r518854 = 2.0;
        double r518855 = r518849 + r518850;
        double r518856 = r518854 - r518855;
        double r518857 = r518856 / r518852;
        double r518858 = r518853 / r518857;
        return r518858;
}

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
Herbie1.3
\[\frac{x}{2 - \left(x + y\right)} - \frac{y}{2 - \left(x + y\right)}\]

Derivation

  1. Initial program 0.0

    \[\frac{x - y}{2 - \left(x + y\right)}\]
  2. Using strategy rm
  3. Applied add-cube-cbrt1.3

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}\right) \cdot \sqrt[3]{x - y}}}{2 - \left(x + y\right)}\]
  4. Applied associate-/l*1.3

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

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

Reproduce

herbie shell --seed 2019305 
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, C"
  :precision binary64

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

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