Average Error: 2.0 → 0.3
Time: 13.9s
Precision: 64
\[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\]
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
double f(double x, double y, double z, double t, double a) {
        double r510232 = x;
        double r510233 = y;
        double r510234 = z;
        double r510235 = r510233 - r510234;
        double r510236 = t;
        double r510237 = r510236 - r510234;
        double r510238 = 1.0;
        double r510239 = r510237 + r510238;
        double r510240 = a;
        double r510241 = r510239 / r510240;
        double r510242 = r510235 / r510241;
        double r510243 = r510232 - r510242;
        return r510243;
}

double f(double x, double y, double z, double t, double a) {
        double r510244 = x;
        double r510245 = y;
        double r510246 = z;
        double r510247 = r510245 - r510246;
        double r510248 = t;
        double r510249 = r510248 - r510246;
        double r510250 = 1.0;
        double r510251 = r510249 + r510250;
        double r510252 = r510247 / r510251;
        double r510253 = a;
        double r510254 = r510252 * r510253;
        double r510255 = r510244 - r510254;
        return r510255;
}

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

Original2.0
Target0.3
Herbie0.3
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Derivation

  1. Initial program 2.0

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\]
  2. Using strategy rm
  3. Applied associate-/r/0.3

    \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\]
  4. Final simplification0.3

    \[\leadsto x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Reproduce

herbie shell --seed 2019323 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

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

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