Average Error: 2.1 → 0.2
Time: 2.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 r611517 = x;
        double r611518 = y;
        double r611519 = z;
        double r611520 = r611518 - r611519;
        double r611521 = t;
        double r611522 = r611521 - r611519;
        double r611523 = 1.0;
        double r611524 = r611522 + r611523;
        double r611525 = a;
        double r611526 = r611524 / r611525;
        double r611527 = r611520 / r611526;
        double r611528 = r611517 - r611527;
        return r611528;
}

double f(double x, double y, double z, double t, double a) {
        double r611529 = x;
        double r611530 = y;
        double r611531 = z;
        double r611532 = r611530 - r611531;
        double r611533 = t;
        double r611534 = r611533 - r611531;
        double r611535 = 1.0;
        double r611536 = r611534 + r611535;
        double r611537 = r611532 / r611536;
        double r611538 = a;
        double r611539 = r611537 * r611538;
        double r611540 = r611529 - r611539;
        return r611540;
}

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

Derivation

  1. Initial program 2.1

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