Average Error: 11.1 → 1.3
Time: 14.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 r413503 = x;
        double r413504 = y;
        double r413505 = z;
        double r413506 = t;
        double r413507 = r413505 - r413506;
        double r413508 = r413504 * r413507;
        double r413509 = a;
        double r413510 = r413509 - r413506;
        double r413511 = r413508 / r413510;
        double r413512 = r413503 + r413511;
        return r413512;
}

double f(double x, double y, double z, double t, double a) {
        double r413513 = x;
        double r413514 = y;
        double r413515 = z;
        double r413516 = t;
        double r413517 = r413515 - r413516;
        double r413518 = a;
        double r413519 = r413518 - r413516;
        double r413520 = r413517 / r413519;
        double r413521 = r413514 * r413520;
        double r413522 = r413513 + r413521;
        return r413522;
}

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.1
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 2019305 
(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))))