Average Error: 0.0 → 0.0
Time: 2.5s
Precision: 64
\[\frac{x + y}{x - y}\]
\[\log \left(1 \cdot e^{\frac{x + y}{x - y}}\right)\]
\frac{x + y}{x - y}
\log \left(1 \cdot e^{\frac{x + y}{x - y}}\right)
double f(double x, double y) {
        double r699886 = x;
        double r699887 = y;
        double r699888 = r699886 + r699887;
        double r699889 = r699886 - r699887;
        double r699890 = r699888 / r699889;
        return r699890;
}

double f(double x, double y) {
        double r699891 = 1.0;
        double r699892 = x;
        double r699893 = y;
        double r699894 = r699892 + r699893;
        double r699895 = r699892 - r699893;
        double r699896 = r699894 / r699895;
        double r699897 = exp(r699896);
        double r699898 = r699891 * r699897;
        double r699899 = log(r699898);
        return r699899;
}

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-log-exp0.0

    \[\leadsto \color{blue}{\log \left(e^{\frac{x + y}{x - y}}\right)}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity0.0

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

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

Reproduce

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

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

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