Average Error: 2.0 → 0.2
Time: 11.2s
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 r495094 = x;
        double r495095 = y;
        double r495096 = z;
        double r495097 = r495095 - r495096;
        double r495098 = t;
        double r495099 = r495098 - r495096;
        double r495100 = 1.0;
        double r495101 = r495099 + r495100;
        double r495102 = a;
        double r495103 = r495101 / r495102;
        double r495104 = r495097 / r495103;
        double r495105 = r495094 - r495104;
        return r495105;
}

double f(double x, double y, double z, double t, double a) {
        double r495106 = x;
        double r495107 = y;
        double r495108 = z;
        double r495109 = r495107 - r495108;
        double r495110 = t;
        double r495111 = r495110 - r495108;
        double r495112 = 1.0;
        double r495113 = r495111 + r495112;
        double r495114 = r495109 / r495113;
        double r495115 = a;
        double r495116 = r495114 * r495115;
        double r495117 = r495106 - r495116;
        return r495117;
}

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.0
Target0.2
Herbie0.2
\[x - \frac{y - z}{\left(t - z\right) + 1} \cdot a\]

Derivation

  1. Initial program 2.0

    \[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 2019350 
(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))))