Average Error: 1.4 → 1.4
Time: 7.4s
Precision: 64
\[x + y \cdot \frac{z - t}{z - a}\]
\[x + y \cdot \frac{z - t}{z - a}\]
x + y \cdot \frac{z - t}{z - a}
x + y \cdot \frac{z - t}{z - a}
double f(double x, double y, double z, double t, double a) {
        double r521095 = x;
        double r521096 = y;
        double r521097 = z;
        double r521098 = t;
        double r521099 = r521097 - r521098;
        double r521100 = a;
        double r521101 = r521097 - r521100;
        double r521102 = r521099 / r521101;
        double r521103 = r521096 * r521102;
        double r521104 = r521095 + r521103;
        return r521104;
}

double f(double x, double y, double z, double t, double a) {
        double r521105 = x;
        double r521106 = y;
        double r521107 = z;
        double r521108 = t;
        double r521109 = r521107 - r521108;
        double r521110 = a;
        double r521111 = r521107 - r521110;
        double r521112 = r521109 / r521111;
        double r521113 = r521106 * r521112;
        double r521114 = r521105 + r521113;
        return r521114;
}

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

Original1.4
Target1.3
Herbie1.4
\[x + \frac{y}{\frac{z - a}{z - t}}\]

Derivation

  1. Initial program 1.4

    \[x + y \cdot \frac{z - t}{z - a}\]
  2. Final simplification1.4

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

Reproduce

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

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

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