Average Error: 2.2 → 0.2
Time: 14.6s
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 r484592 = x;
        double r484593 = y;
        double r484594 = z;
        double r484595 = r484593 - r484594;
        double r484596 = t;
        double r484597 = r484596 - r484594;
        double r484598 = 1.0;
        double r484599 = r484597 + r484598;
        double r484600 = a;
        double r484601 = r484599 / r484600;
        double r484602 = r484595 / r484601;
        double r484603 = r484592 - r484602;
        return r484603;
}

double f(double x, double y, double z, double t, double a) {
        double r484604 = x;
        double r484605 = y;
        double r484606 = z;
        double r484607 = r484605 - r484606;
        double r484608 = t;
        double r484609 = r484608 - r484606;
        double r484610 = 1.0;
        double r484611 = r484609 + r484610;
        double r484612 = r484607 / r484611;
        double r484613 = a;
        double r484614 = r484612 * r484613;
        double r484615 = r484604 - r484614;
        return r484615;
}

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

Derivation

  1. Initial program 2.2

    \[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 2019303 
(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))))