Average Error: 1.9 → 0.2
Time: 4.4s
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 r619485 = x;
        double r619486 = y;
        double r619487 = z;
        double r619488 = r619486 - r619487;
        double r619489 = t;
        double r619490 = r619489 - r619487;
        double r619491 = 1.0;
        double r619492 = r619490 + r619491;
        double r619493 = a;
        double r619494 = r619492 / r619493;
        double r619495 = r619488 / r619494;
        double r619496 = r619485 - r619495;
        return r619496;
}

double f(double x, double y, double z, double t, double a) {
        double r619497 = x;
        double r619498 = y;
        double r619499 = z;
        double r619500 = r619498 - r619499;
        double r619501 = t;
        double r619502 = r619501 - r619499;
        double r619503 = 1.0;
        double r619504 = r619502 + r619503;
        double r619505 = r619500 / r619504;
        double r619506 = a;
        double r619507 = r619505 * r619506;
        double r619508 = r619497 - r619507;
        return r619508;
}

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