Average Error: 2.1 → 0.2
Time: 13.5s
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 r409063 = x;
        double r409064 = y;
        double r409065 = z;
        double r409066 = r409064 - r409065;
        double r409067 = t;
        double r409068 = r409067 - r409065;
        double r409069 = 1.0;
        double r409070 = r409068 + r409069;
        double r409071 = a;
        double r409072 = r409070 / r409071;
        double r409073 = r409066 / r409072;
        double r409074 = r409063 - r409073;
        return r409074;
}

double f(double x, double y, double z, double t, double a) {
        double r409075 = x;
        double r409076 = y;
        double r409077 = z;
        double r409078 = r409076 - r409077;
        double r409079 = t;
        double r409080 = r409079 - r409077;
        double r409081 = 1.0;
        double r409082 = r409080 + r409081;
        double r409083 = r409078 / r409082;
        double r409084 = a;
        double r409085 = r409083 * r409084;
        double r409086 = r409075 - r409085;
        return r409086;
}

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

Original2.1
Target0.2
Herbie0.2
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Derivation

  1. Initial program 2.1

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