Average Error: 1.9 → 0.3
Time: 9.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 r285506 = x;
        double r285507 = y;
        double r285508 = z;
        double r285509 = r285507 - r285508;
        double r285510 = t;
        double r285511 = r285510 - r285508;
        double r285512 = 1.0;
        double r285513 = r285511 + r285512;
        double r285514 = a;
        double r285515 = r285513 / r285514;
        double r285516 = r285509 / r285515;
        double r285517 = r285506 - r285516;
        return r285517;
}

double f(double x, double y, double z, double t, double a) {
        double r285518 = x;
        double r285519 = y;
        double r285520 = z;
        double r285521 = r285519 - r285520;
        double r285522 = t;
        double r285523 = r285522 - r285520;
        double r285524 = 1.0;
        double r285525 = r285523 + r285524;
        double r285526 = r285521 / r285525;
        double r285527 = a;
        double r285528 = r285526 * r285527;
        double r285529 = r285518 - r285528;
        return r285529;
}

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