Average Error: 2.2 → 0.2
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 r498380 = x;
        double r498381 = y;
        double r498382 = z;
        double r498383 = r498381 - r498382;
        double r498384 = t;
        double r498385 = r498384 - r498382;
        double r498386 = 1.0;
        double r498387 = r498385 + r498386;
        double r498388 = a;
        double r498389 = r498387 / r498388;
        double r498390 = r498383 / r498389;
        double r498391 = r498380 - r498390;
        return r498391;
}

double f(double x, double y, double z, double t, double a) {
        double r498392 = x;
        double r498393 = y;
        double r498394 = z;
        double r498395 = r498393 - r498394;
        double r498396 = t;
        double r498397 = r498396 - r498394;
        double r498398 = 1.0;
        double r498399 = r498397 + r498398;
        double r498400 = r498395 / r498399;
        double r498401 = a;
        double r498402 = r498400 * r498401;
        double r498403 = r498392 - r498402;
        return r498403;
}

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