Average Error: 1.8 → 0.2
Time: 9.3s
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 r1339194 = x;
        double r1339195 = y;
        double r1339196 = z;
        double r1339197 = r1339195 - r1339196;
        double r1339198 = t;
        double r1339199 = r1339198 - r1339196;
        double r1339200 = 1.0;
        double r1339201 = r1339199 + r1339200;
        double r1339202 = a;
        double r1339203 = r1339201 / r1339202;
        double r1339204 = r1339197 / r1339203;
        double r1339205 = r1339194 - r1339204;
        return r1339205;
}

double f(double x, double y, double z, double t, double a) {
        double r1339206 = x;
        double r1339207 = y;
        double r1339208 = z;
        double r1339209 = r1339207 - r1339208;
        double r1339210 = t;
        double r1339211 = r1339210 - r1339208;
        double r1339212 = 1.0;
        double r1339213 = r1339211 + r1339212;
        double r1339214 = r1339209 / r1339213;
        double r1339215 = a;
        double r1339216 = r1339214 * r1339215;
        double r1339217 = r1339206 - r1339216;
        return r1339217;
}

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