Average Error: 2.3 → 0.2
Time: 4.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 r593209 = x;
        double r593210 = y;
        double r593211 = z;
        double r593212 = r593210 - r593211;
        double r593213 = t;
        double r593214 = r593213 - r593211;
        double r593215 = 1.0;
        double r593216 = r593214 + r593215;
        double r593217 = a;
        double r593218 = r593216 / r593217;
        double r593219 = r593212 / r593218;
        double r593220 = r593209 - r593219;
        return r593220;
}

double f(double x, double y, double z, double t, double a) {
        double r593221 = x;
        double r593222 = y;
        double r593223 = z;
        double r593224 = r593222 - r593223;
        double r593225 = t;
        double r593226 = r593225 - r593223;
        double r593227 = 1.0;
        double r593228 = r593226 + r593227;
        double r593229 = r593224 / r593228;
        double r593230 = a;
        double r593231 = r593229 * r593230;
        double r593232 = r593221 - r593231;
        return r593232;
}

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.3
Target0.2
Herbie0.2
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Derivation

  1. Initial program 2.3

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