Average Error: 0.0 → 0.0
Time: 11.9s
Precision: 64
\[\frac{x + y}{x - y}\]
\[\frac{1}{\log \left(e^{\frac{1}{\frac{x + y}{x - y}}}\right)}\]
\frac{x + y}{x - y}
\frac{1}{\log \left(e^{\frac{1}{\frac{x + y}{x - y}}}\right)}
double f(double x, double y) {
        double r25888679 = x;
        double r25888680 = y;
        double r25888681 = r25888679 + r25888680;
        double r25888682 = r25888679 - r25888680;
        double r25888683 = r25888681 / r25888682;
        return r25888683;
}

double f(double x, double y) {
        double r25888684 = 1.0;
        double r25888685 = x;
        double r25888686 = y;
        double r25888687 = r25888685 + r25888686;
        double r25888688 = r25888685 - r25888686;
        double r25888689 = r25888687 / r25888688;
        double r25888690 = r25888684 / r25888689;
        double r25888691 = exp(r25888690);
        double r25888692 = log(r25888691);
        double r25888693 = r25888684 / r25888692;
        return r25888693;
}

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 clear-num0.0

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

    \[\leadsto \frac{1}{\color{blue}{\log \left(e^{\frac{x - y}{x + y}}\right)}}\]
  6. Using strategy rm
  7. Applied clear-num0.0

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

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

Reproduce

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