Average Error: 2.1 → 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 r478997 = x;
        double r478998 = y;
        double r478999 = z;
        double r479000 = r478998 - r478999;
        double r479001 = t;
        double r479002 = r479001 - r478999;
        double r479003 = 1.0;
        double r479004 = r479002 + r479003;
        double r479005 = a;
        double r479006 = r479004 / r479005;
        double r479007 = r479000 / r479006;
        double r479008 = r478997 - r479007;
        return r479008;
}

double f(double x, double y, double z, double t, double a) {
        double r479009 = x;
        double r479010 = y;
        double r479011 = z;
        double r479012 = r479010 - r479011;
        double r479013 = t;
        double r479014 = r479013 - r479011;
        double r479015 = 1.0;
        double r479016 = r479014 + r479015;
        double r479017 = r479012 / r479016;
        double r479018 = a;
        double r479019 = r479017 * r479018;
        double r479020 = r479009 - r479019;
        return r479020;
}

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.2
Herbie0.2
\[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.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 2019304 
(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))))