Average Error: 1.9 → 0.3
Time: 11.7s
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 r473542 = x;
        double r473543 = y;
        double r473544 = z;
        double r473545 = r473543 - r473544;
        double r473546 = t;
        double r473547 = r473546 - r473544;
        double r473548 = 1.0;
        double r473549 = r473547 + r473548;
        double r473550 = a;
        double r473551 = r473549 / r473550;
        double r473552 = r473545 / r473551;
        double r473553 = r473542 - r473552;
        return r473553;
}

double f(double x, double y, double z, double t, double a) {
        double r473554 = x;
        double r473555 = y;
        double r473556 = z;
        double r473557 = r473555 - r473556;
        double r473558 = t;
        double r473559 = r473558 - r473556;
        double r473560 = 1.0;
        double r473561 = r473559 + r473560;
        double r473562 = r473557 / r473561;
        double r473563 = a;
        double r473564 = r473562 * r473563;
        double r473565 = r473554 - r473564;
        return r473565;
}

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 2019297 
(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))))