Average Error: 2.1 → 0.3
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 r558838 = x;
        double r558839 = y;
        double r558840 = z;
        double r558841 = r558839 - r558840;
        double r558842 = t;
        double r558843 = r558842 - r558840;
        double r558844 = 1.0;
        double r558845 = r558843 + r558844;
        double r558846 = a;
        double r558847 = r558845 / r558846;
        double r558848 = r558841 / r558847;
        double r558849 = r558838 - r558848;
        return r558849;
}

double f(double x, double y, double z, double t, double a) {
        double r558850 = x;
        double r558851 = y;
        double r558852 = z;
        double r558853 = r558851 - r558852;
        double r558854 = t;
        double r558855 = r558854 - r558852;
        double r558856 = 1.0;
        double r558857 = r558855 + r558856;
        double r558858 = r558853 / r558857;
        double r558859 = a;
        double r558860 = r558858 * r558859;
        double r558861 = r558850 - r558860;
        return r558861;
}

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.3
Herbie0.3
\[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.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 2020002 
(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))))