Average Error: 1.3 → 1.3
Time: 10.3s
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 r666095 = x;
        double r666096 = y;
        double r666097 = z;
        double r666098 = t;
        double r666099 = r666097 - r666098;
        double r666100 = a;
        double r666101 = r666097 - r666100;
        double r666102 = r666099 / r666101;
        double r666103 = r666096 * r666102;
        double r666104 = r666095 + r666103;
        return r666104;
}

double f(double x, double y, double z, double t, double a) {
        double r666105 = x;
        double r666106 = y;
        double r666107 = z;
        double r666108 = t;
        double r666109 = r666107 - r666108;
        double r666110 = a;
        double r666111 = r666107 - r666110;
        double r666112 = r666109 / r666111;
        double r666113 = r666106 * r666112;
        double r666114 = r666105 + r666113;
        return r666114;
}

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

Derivation

  1. Initial program 1.3

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

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

Reproduce

herbie shell --seed 2020047 
(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)))))