Average Error: 2.1 → 0.2
Time: 5.2s
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 r812078 = x;
        double r812079 = y;
        double r812080 = z;
        double r812081 = r812079 - r812080;
        double r812082 = t;
        double r812083 = r812082 - r812080;
        double r812084 = 1.0;
        double r812085 = r812083 + r812084;
        double r812086 = a;
        double r812087 = r812085 / r812086;
        double r812088 = r812081 / r812087;
        double r812089 = r812078 - r812088;
        return r812089;
}

double f(double x, double y, double z, double t, double a) {
        double r812090 = x;
        double r812091 = y;
        double r812092 = z;
        double r812093 = r812091 - r812092;
        double r812094 = t;
        double r812095 = r812094 - r812092;
        double r812096 = 1.0;
        double r812097 = r812095 + r812096;
        double r812098 = r812093 / r812097;
        double r812099 = a;
        double r812100 = r812098 * r812099;
        double r812101 = r812090 - r812100;
        return r812101;
}

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