Average Error: 1.9 → 0.2
Time: 4.1s
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 r699297 = x;
        double r699298 = y;
        double r699299 = z;
        double r699300 = r699298 - r699299;
        double r699301 = t;
        double r699302 = r699301 - r699299;
        double r699303 = 1.0;
        double r699304 = r699302 + r699303;
        double r699305 = a;
        double r699306 = r699304 / r699305;
        double r699307 = r699300 / r699306;
        double r699308 = r699297 - r699307;
        return r699308;
}

double f(double x, double y, double z, double t, double a) {
        double r699309 = x;
        double r699310 = y;
        double r699311 = z;
        double r699312 = r699310 - r699311;
        double r699313 = t;
        double r699314 = r699313 - r699311;
        double r699315 = 1.0;
        double r699316 = r699314 + r699315;
        double r699317 = r699312 / r699316;
        double r699318 = a;
        double r699319 = r699317 * r699318;
        double r699320 = r699309 - r699319;
        return r699320;
}

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