Average Error: 1.9 → 0.2
Time: 15.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 r392311 = x;
        double r392312 = y;
        double r392313 = z;
        double r392314 = r392312 - r392313;
        double r392315 = t;
        double r392316 = r392315 - r392313;
        double r392317 = 1.0;
        double r392318 = r392316 + r392317;
        double r392319 = a;
        double r392320 = r392318 / r392319;
        double r392321 = r392314 / r392320;
        double r392322 = r392311 - r392321;
        return r392322;
}

double f(double x, double y, double z, double t, double a) {
        double r392323 = x;
        double r392324 = y;
        double r392325 = z;
        double r392326 = r392324 - r392325;
        double r392327 = t;
        double r392328 = r392327 - r392325;
        double r392329 = 1.0;
        double r392330 = r392328 + r392329;
        double r392331 = r392326 / r392330;
        double r392332 = a;
        double r392333 = r392331 * r392332;
        double r392334 = r392323 - r392333;
        return r392334;
}

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