Average Error: 1.9 → 0.2
Time: 13.8s
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 r410539 = x;
        double r410540 = y;
        double r410541 = z;
        double r410542 = r410540 - r410541;
        double r410543 = t;
        double r410544 = r410543 - r410541;
        double r410545 = 1.0;
        double r410546 = r410544 + r410545;
        double r410547 = a;
        double r410548 = r410546 / r410547;
        double r410549 = r410542 / r410548;
        double r410550 = r410539 - r410549;
        return r410550;
}

double f(double x, double y, double z, double t, double a) {
        double r410551 = x;
        double r410552 = y;
        double r410553 = z;
        double r410554 = r410552 - r410553;
        double r410555 = t;
        double r410556 = r410555 - r410553;
        double r410557 = 1.0;
        double r410558 = r410556 + r410557;
        double r410559 = r410554 / r410558;
        double r410560 = a;
        double r410561 = r410559 * r410560;
        double r410562 = r410551 - r410561;
        return r410562;
}

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.9
Target0.2
Herbie0.2
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Derivation

  1. Initial program 1.9

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

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

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

Reproduce

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