Average Error: 1.9 → 0.2
Time: 15.8s
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 r420883 = x;
        double r420884 = y;
        double r420885 = z;
        double r420886 = r420884 - r420885;
        double r420887 = t;
        double r420888 = r420887 - r420885;
        double r420889 = 1.0;
        double r420890 = r420888 + r420889;
        double r420891 = a;
        double r420892 = r420890 / r420891;
        double r420893 = r420886 / r420892;
        double r420894 = r420883 - r420893;
        return r420894;
}

double f(double x, double y, double z, double t, double a) {
        double r420895 = x;
        double r420896 = y;
        double r420897 = z;
        double r420898 = r420896 - r420897;
        double r420899 = t;
        double r420900 = r420899 - r420897;
        double r420901 = 1.0;
        double r420902 = r420900 + r420901;
        double r420903 = r420898 / r420902;
        double r420904 = a;
        double r420905 = r420903 * r420904;
        double r420906 = r420895 - r420905;
        return r420906;
}

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