Average Error: 1.8 → 0.2
Time: 3.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 r595928 = x;
        double r595929 = y;
        double r595930 = z;
        double r595931 = r595929 - r595930;
        double r595932 = t;
        double r595933 = r595932 - r595930;
        double r595934 = 1.0;
        double r595935 = r595933 + r595934;
        double r595936 = a;
        double r595937 = r595935 / r595936;
        double r595938 = r595931 / r595937;
        double r595939 = r595928 - r595938;
        return r595939;
}

double f(double x, double y, double z, double t, double a) {
        double r595940 = x;
        double r595941 = y;
        double r595942 = z;
        double r595943 = r595941 - r595942;
        double r595944 = t;
        double r595945 = r595944 - r595942;
        double r595946 = 1.0;
        double r595947 = r595945 + r595946;
        double r595948 = r595943 / r595947;
        double r595949 = a;
        double r595950 = r595948 * r595949;
        double r595951 = r595940 - r595950;
        return r595951;
}

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.2
Herbie0.2
\[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.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 2020064 
(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))))