Average Error: 2.2 → 0.2
Time: 12.9s
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 r475065 = x;
        double r475066 = y;
        double r475067 = z;
        double r475068 = r475066 - r475067;
        double r475069 = t;
        double r475070 = r475069 - r475067;
        double r475071 = 1.0;
        double r475072 = r475070 + r475071;
        double r475073 = a;
        double r475074 = r475072 / r475073;
        double r475075 = r475068 / r475074;
        double r475076 = r475065 - r475075;
        return r475076;
}

double f(double x, double y, double z, double t, double a) {
        double r475077 = x;
        double r475078 = y;
        double r475079 = z;
        double r475080 = r475078 - r475079;
        double r475081 = t;
        double r475082 = r475081 - r475079;
        double r475083 = 1.0;
        double r475084 = r475082 + r475083;
        double r475085 = r475080 / r475084;
        double r475086 = a;
        double r475087 = r475085 * r475086;
        double r475088 = r475077 - r475087;
        return r475088;
}

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

Derivation

  1. Initial program 2.2

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