Average Error: 1.9 → 0.2
Time: 3.6s
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 r662683 = x;
        double r662684 = y;
        double r662685 = z;
        double r662686 = r662684 - r662685;
        double r662687 = t;
        double r662688 = r662687 - r662685;
        double r662689 = 1.0;
        double r662690 = r662688 + r662689;
        double r662691 = a;
        double r662692 = r662690 / r662691;
        double r662693 = r662686 / r662692;
        double r662694 = r662683 - r662693;
        return r662694;
}

double f(double x, double y, double z, double t, double a) {
        double r662695 = x;
        double r662696 = y;
        double r662697 = z;
        double r662698 = r662696 - r662697;
        double r662699 = t;
        double r662700 = r662699 - r662697;
        double r662701 = 1.0;
        double r662702 = r662700 + r662701;
        double r662703 = r662698 / r662702;
        double r662704 = a;
        double r662705 = r662703 * r662704;
        double r662706 = r662695 - r662705;
        return r662706;
}

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