Average Error: 0.0 → 0.0
Time: 2.7s
Precision: 64
\[\frac{x - y}{x + y}\]
\[\frac{x}{x + y} - \log \left(e^{\sqrt[3]{{\left(\frac{y}{x + y}\right)}^{3}}}\right)\]
\frac{x - y}{x + y}
\frac{x}{x + y} - \log \left(e^{\sqrt[3]{{\left(\frac{y}{x + y}\right)}^{3}}}\right)
double f(double x, double y) {
        double r850608 = x;
        double r850609 = y;
        double r850610 = r850608 - r850609;
        double r850611 = r850608 + r850609;
        double r850612 = r850610 / r850611;
        return r850612;
}

double f(double x, double y) {
        double r850613 = x;
        double r850614 = y;
        double r850615 = r850613 + r850614;
        double r850616 = r850613 / r850615;
        double r850617 = r850614 / r850615;
        double r850618 = 3.0;
        double r850619 = pow(r850617, r850618);
        double r850620 = cbrt(r850619);
        double r850621 = exp(r850620);
        double r850622 = log(r850621);
        double r850623 = r850616 - r850622;
        return r850623;
}

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{x}{x + y} - \frac{y}{x + y}\]

Derivation

  1. Initial program 0.0

    \[\frac{x - y}{x + y}\]
  2. Using strategy rm
  3. Applied div-sub0.0

    \[\leadsto \color{blue}{\frac{x}{x + y} - \frac{y}{x + y}}\]
  4. Using strategy rm
  5. Applied add-log-exp0.0

    \[\leadsto \frac{x}{x + y} - \color{blue}{\log \left(e^{\frac{y}{x + y}}\right)}\]
  6. Using strategy rm
  7. Applied add-cbrt-cube24.5

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

    \[\leadsto \frac{x}{x + y} - \log \left(e^{\frac{\color{blue}{\sqrt[3]{\left(y \cdot y\right) \cdot y}}}{\sqrt[3]{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + y\right)}}}\right)\]
  9. Applied cbrt-undiv28.6

    \[\leadsto \frac{x}{x + y} - \log \left(e^{\color{blue}{\sqrt[3]{\frac{\left(y \cdot y\right) \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(x + y\right)}}}}\right)\]
  10. Simplified0.0

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

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

Reproduce

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

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

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