Average Error: 1.9 → 0.3
Time: 4.7s
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 r482462 = x;
        double r482463 = y;
        double r482464 = z;
        double r482465 = r482463 - r482464;
        double r482466 = t;
        double r482467 = r482466 - r482464;
        double r482468 = 1.0;
        double r482469 = r482467 + r482468;
        double r482470 = a;
        double r482471 = r482469 / r482470;
        double r482472 = r482465 / r482471;
        double r482473 = r482462 - r482472;
        return r482473;
}

double f(double x, double y, double z, double t, double a) {
        double r482474 = x;
        double r482475 = y;
        double r482476 = z;
        double r482477 = r482475 - r482476;
        double r482478 = t;
        double r482479 = r482478 - r482476;
        double r482480 = 1.0;
        double r482481 = r482479 + r482480;
        double r482482 = r482477 / r482481;
        double r482483 = a;
        double r482484 = r482482 * r482483;
        double r482485 = r482474 - r482484;
        return r482485;
}

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

Original1.9
Target0.3
Herbie0.3
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Derivation

  1. Initial program 1.9

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\]
  2. Using strategy rm
  3. Applied associate-/r/0.3

    \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\]
  4. Final simplification0.3

    \[\leadsto x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Reproduce

herbie shell --seed 2020035 
(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))))