Average Error: 1.9 → 0.3
Time: 4.6s
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 r582677 = x;
        double r582678 = y;
        double r582679 = z;
        double r582680 = r582678 - r582679;
        double r582681 = t;
        double r582682 = r582681 - r582679;
        double r582683 = 1.0;
        double r582684 = r582682 + r582683;
        double r582685 = a;
        double r582686 = r582684 / r582685;
        double r582687 = r582680 / r582686;
        double r582688 = r582677 - r582687;
        return r582688;
}

double f(double x, double y, double z, double t, double a) {
        double r582689 = x;
        double r582690 = y;
        double r582691 = z;
        double r582692 = r582690 - r582691;
        double r582693 = t;
        double r582694 = r582693 - r582691;
        double r582695 = 1.0;
        double r582696 = r582694 + r582695;
        double r582697 = r582692 / r582696;
        double r582698 = a;
        double r582699 = r582697 * r582698;
        double r582700 = r582689 - r582699;
        return r582700;
}

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

Derivation

  1. Initial program 1.9

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\]
  2. Using strategy rm
  3. Applied associate-/r/0.3

    \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\]
  4. Final simplification0.3

    \[\leadsto x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Reproduce

herbie shell --seed 2020083 
(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))))