Average Error: 11.1 → 1.3
Time: 4.7s
Precision: 64
\[x + \frac{y \cdot \left(z - t\right)}{a - t}\]
\[x + y \cdot \frac{z - t}{a - t}\]
x + \frac{y \cdot \left(z - t\right)}{a - t}
x + y \cdot \frac{z - t}{a - t}
double f(double x, double y, double z, double t, double a) {
        double r628169 = x;
        double r628170 = y;
        double r628171 = z;
        double r628172 = t;
        double r628173 = r628171 - r628172;
        double r628174 = r628170 * r628173;
        double r628175 = a;
        double r628176 = r628175 - r628172;
        double r628177 = r628174 / r628176;
        double r628178 = r628169 + r628177;
        return r628178;
}

double f(double x, double y, double z, double t, double a) {
        double r628179 = x;
        double r628180 = y;
        double r628181 = z;
        double r628182 = t;
        double r628183 = r628181 - r628182;
        double r628184 = a;
        double r628185 = r628184 - r628182;
        double r628186 = r628183 / r628185;
        double r628187 = r628180 * r628186;
        double r628188 = r628179 + r628187;
        return r628188;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original11.1
Target1.2
Herbie1.3
\[x + \frac{y}{\frac{a - t}{z - t}}\]

Derivation

  1. Initial program 11.1

    \[x + \frac{y \cdot \left(z - t\right)}{a - t}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity11.1

    \[\leadsto x + \frac{y \cdot \left(z - t\right)}{\color{blue}{1 \cdot \left(a - t\right)}}\]
  4. Applied times-frac1.3

    \[\leadsto x + \color{blue}{\frac{y}{1} \cdot \frac{z - t}{a - t}}\]
  5. Simplified1.3

    \[\leadsto x + \color{blue}{y} \cdot \frac{z - t}{a - t}\]
  6. Final simplification1.3

    \[\leadsto x + y \cdot \frac{z - t}{a - t}\]

Reproduce

herbie shell --seed 2020060 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- a t) (- z t))))

  (+ x (/ (* y (- z t)) (- a t))))