Average Error: 2.0 → 0.2
Time: 14.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 r366495 = x;
        double r366496 = y;
        double r366497 = z;
        double r366498 = r366496 - r366497;
        double r366499 = t;
        double r366500 = r366499 - r366497;
        double r366501 = 1.0;
        double r366502 = r366500 + r366501;
        double r366503 = a;
        double r366504 = r366502 / r366503;
        double r366505 = r366498 / r366504;
        double r366506 = r366495 - r366505;
        return r366506;
}

double f(double x, double y, double z, double t, double a) {
        double r366507 = x;
        double r366508 = y;
        double r366509 = z;
        double r366510 = r366508 - r366509;
        double r366511 = t;
        double r366512 = r366511 - r366509;
        double r366513 = 1.0;
        double r366514 = r366512 + r366513;
        double r366515 = r366510 / r366514;
        double r366516 = a;
        double r366517 = r366515 * r366516;
        double r366518 = r366507 - r366517;
        return r366518;
}

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.2
Herbie0.2
\[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.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 2019294 
(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))))