Average Error: 1.8 → 0.3
Time: 4.4s
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 r707756 = x;
        double r707757 = y;
        double r707758 = z;
        double r707759 = r707757 - r707758;
        double r707760 = t;
        double r707761 = r707760 - r707758;
        double r707762 = 1.0;
        double r707763 = r707761 + r707762;
        double r707764 = a;
        double r707765 = r707763 / r707764;
        double r707766 = r707759 / r707765;
        double r707767 = r707756 - r707766;
        return r707767;
}

double f(double x, double y, double z, double t, double a) {
        double r707768 = x;
        double r707769 = y;
        double r707770 = z;
        double r707771 = r707769 - r707770;
        double r707772 = t;
        double r707773 = r707772 - r707770;
        double r707774 = 1.0;
        double r707775 = r707773 + r707774;
        double r707776 = r707771 / r707775;
        double r707777 = a;
        double r707778 = r707776 * r707777;
        double r707779 = r707768 - r707778;
        return r707779;
}

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.8
Target0.3
Herbie0.3
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Derivation

  1. Initial program 1.8

    \[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 2020021 
(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))))