Average Error: 2.3 → 0.2
Time: 3.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 r735362 = x;
        double r735363 = y;
        double r735364 = z;
        double r735365 = r735363 - r735364;
        double r735366 = t;
        double r735367 = r735366 - r735364;
        double r735368 = 1.0;
        double r735369 = r735367 + r735368;
        double r735370 = a;
        double r735371 = r735369 / r735370;
        double r735372 = r735365 / r735371;
        double r735373 = r735362 - r735372;
        return r735373;
}

double f(double x, double y, double z, double t, double a) {
        double r735374 = x;
        double r735375 = y;
        double r735376 = z;
        double r735377 = r735375 - r735376;
        double r735378 = t;
        double r735379 = r735378 - r735376;
        double r735380 = 1.0;
        double r735381 = r735379 + r735380;
        double r735382 = r735377 / r735381;
        double r735383 = a;
        double r735384 = r735382 * r735383;
        double r735385 = r735374 - r735384;
        return r735385;
}

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

Derivation

  1. Initial program 2.3

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