Average Error: 1.3 → 1.3
Time: 17.2s
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 r394111 = x;
        double r394112 = y;
        double r394113 = z;
        double r394114 = t;
        double r394115 = r394113 - r394114;
        double r394116 = a;
        double r394117 = r394113 - r394116;
        double r394118 = r394115 / r394117;
        double r394119 = r394112 * r394118;
        double r394120 = r394111 + r394119;
        return r394120;
}

double f(double x, double y, double z, double t, double a) {
        double r394121 = x;
        double r394122 = y;
        double r394123 = z;
        double r394124 = t;
        double r394125 = r394123 - r394124;
        double r394126 = a;
        double r394127 = r394123 - r394126;
        double r394128 = r394125 / r394127;
        double r394129 = r394122 * r394128;
        double r394130 = r394121 + r394129;
        return r394130;
}

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