Average Error: 2.1 → 0.2
Time: 11.8s
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 r523158 = x;
        double r523159 = y;
        double r523160 = z;
        double r523161 = r523159 - r523160;
        double r523162 = t;
        double r523163 = r523162 - r523160;
        double r523164 = 1.0;
        double r523165 = r523163 + r523164;
        double r523166 = a;
        double r523167 = r523165 / r523166;
        double r523168 = r523161 / r523167;
        double r523169 = r523158 - r523168;
        return r523169;
}

double f(double x, double y, double z, double t, double a) {
        double r523170 = x;
        double r523171 = y;
        double r523172 = z;
        double r523173 = r523171 - r523172;
        double r523174 = t;
        double r523175 = r523174 - r523172;
        double r523176 = 1.0;
        double r523177 = r523175 + r523176;
        double r523178 = r523173 / r523177;
        double r523179 = a;
        double r523180 = r523178 * r523179;
        double r523181 = r523170 - r523180;
        return r523181;
}

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

Derivation

  1. Initial program 2.1

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