Average Error: 1.9 → 0.2
Time: 4.1s
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 r647055 = x;
        double r647056 = y;
        double r647057 = z;
        double r647058 = r647056 - r647057;
        double r647059 = t;
        double r647060 = r647059 - r647057;
        double r647061 = 1.0;
        double r647062 = r647060 + r647061;
        double r647063 = a;
        double r647064 = r647062 / r647063;
        double r647065 = r647058 / r647064;
        double r647066 = r647055 - r647065;
        return r647066;
}

double f(double x, double y, double z, double t, double a) {
        double r647067 = x;
        double r647068 = y;
        double r647069 = z;
        double r647070 = r647068 - r647069;
        double r647071 = t;
        double r647072 = r647071 - r647069;
        double r647073 = 1.0;
        double r647074 = r647072 + r647073;
        double r647075 = r647070 / r647074;
        double r647076 = a;
        double r647077 = r647075 * r647076;
        double r647078 = r647067 - r647077;
        return r647078;
}

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