Average Error: 2.0 → 0.3
Time: 14.3s
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 r456542 = x;
        double r456543 = y;
        double r456544 = z;
        double r456545 = r456543 - r456544;
        double r456546 = t;
        double r456547 = r456546 - r456544;
        double r456548 = 1.0;
        double r456549 = r456547 + r456548;
        double r456550 = a;
        double r456551 = r456549 / r456550;
        double r456552 = r456545 / r456551;
        double r456553 = r456542 - r456552;
        return r456553;
}

double f(double x, double y, double z, double t, double a) {
        double r456554 = x;
        double r456555 = y;
        double r456556 = z;
        double r456557 = r456555 - r456556;
        double r456558 = t;
        double r456559 = r456558 - r456556;
        double r456560 = 1.0;
        double r456561 = r456559 + r456560;
        double r456562 = r456557 / r456561;
        double r456563 = a;
        double r456564 = r456562 * r456563;
        double r456565 = r456554 - r456564;
        return r456565;
}

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