Average Error: 11.0 → 1.5
Time: 17.2s
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 r491522 = x;
        double r491523 = y;
        double r491524 = z;
        double r491525 = t;
        double r491526 = r491524 - r491525;
        double r491527 = r491523 * r491526;
        double r491528 = a;
        double r491529 = r491528 - r491525;
        double r491530 = r491527 / r491529;
        double r491531 = r491522 + r491530;
        return r491531;
}

double f(double x, double y, double z, double t, double a) {
        double r491532 = x;
        double r491533 = y;
        double r491534 = z;
        double r491535 = t;
        double r491536 = r491534 - r491535;
        double r491537 = a;
        double r491538 = r491537 - r491535;
        double r491539 = r491536 / r491538;
        double r491540 = r491533 * r491539;
        double r491541 = r491532 + r491540;
        return r491541;
}

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.0
Target1.3
Herbie1.5
\[x + \frac{y}{\frac{a - t}{z - t}}\]

Derivation

  1. Initial program 11.0

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

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

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

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

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

Reproduce

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

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

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