Average Error: 1.9 → 0.2
Time: 4.0s
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 r589758 = x;
        double r589759 = y;
        double r589760 = z;
        double r589761 = r589759 - r589760;
        double r589762 = t;
        double r589763 = r589762 - r589760;
        double r589764 = 1.0;
        double r589765 = r589763 + r589764;
        double r589766 = a;
        double r589767 = r589765 / r589766;
        double r589768 = r589761 / r589767;
        double r589769 = r589758 - r589768;
        return r589769;
}

double f(double x, double y, double z, double t, double a) {
        double r589770 = x;
        double r589771 = y;
        double r589772 = z;
        double r589773 = r589771 - r589772;
        double r589774 = t;
        double r589775 = r589774 - r589772;
        double r589776 = 1.0;
        double r589777 = r589775 + r589776;
        double r589778 = r589773 / r589777;
        double r589779 = a;
        double r589780 = r589778 * r589779;
        double r589781 = r589770 - r589780;
        return r589781;
}

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