Average Error: 1.9 → 0.2
Time: 3.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 r769609 = x;
        double r769610 = y;
        double r769611 = z;
        double r769612 = r769610 - r769611;
        double r769613 = t;
        double r769614 = r769613 - r769611;
        double r769615 = 1.0;
        double r769616 = r769614 + r769615;
        double r769617 = a;
        double r769618 = r769616 / r769617;
        double r769619 = r769612 / r769618;
        double r769620 = r769609 - r769619;
        return r769620;
}

double f(double x, double y, double z, double t, double a) {
        double r769621 = x;
        double r769622 = y;
        double r769623 = z;
        double r769624 = r769622 - r769623;
        double r769625 = t;
        double r769626 = r769625 - r769623;
        double r769627 = 1.0;
        double r769628 = r769626 + r769627;
        double r769629 = r769624 / r769628;
        double r769630 = a;
        double r769631 = r769629 * r769630;
        double r769632 = r769621 - r769631;
        return r769632;
}

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 2020060 
(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))))