Average Error: 2.1 → 0.2
Time: 15.0s
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 r395415 = x;
        double r395416 = y;
        double r395417 = z;
        double r395418 = r395416 - r395417;
        double r395419 = t;
        double r395420 = r395419 - r395417;
        double r395421 = 1.0;
        double r395422 = r395420 + r395421;
        double r395423 = a;
        double r395424 = r395422 / r395423;
        double r395425 = r395418 / r395424;
        double r395426 = r395415 - r395425;
        return r395426;
}

double f(double x, double y, double z, double t, double a) {
        double r395427 = x;
        double r395428 = y;
        double r395429 = z;
        double r395430 = r395428 - r395429;
        double r395431 = t;
        double r395432 = r395431 - r395429;
        double r395433 = 1.0;
        double r395434 = r395432 + r395433;
        double r395435 = r395430 / r395434;
        double r395436 = a;
        double r395437 = r395435 * r395436;
        double r395438 = r395427 - r395437;
        return r395438;
}

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