Average Error: 23.4 → 23.4
Time: 7.5s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r798128 = x;
        double r798129 = y;
        double r798130 = r798128 * r798129;
        double r798131 = z;
        double r798132 = t;
        double r798133 = a;
        double r798134 = r798132 - r798133;
        double r798135 = r798131 * r798134;
        double r798136 = r798130 + r798135;
        double r798137 = b;
        double r798138 = r798137 - r798129;
        double r798139 = r798131 * r798138;
        double r798140 = r798129 + r798139;
        double r798141 = r798136 / r798140;
        return r798141;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r798142 = x;
        double r798143 = y;
        double r798144 = r798142 * r798143;
        double r798145 = z;
        double r798146 = t;
        double r798147 = a;
        double r798148 = r798146 - r798147;
        double r798149 = r798145 * r798148;
        double r798150 = r798144 + r798149;
        double r798151 = 1.0;
        double r798152 = b;
        double r798153 = r798152 - r798143;
        double r798154 = r798145 * r798153;
        double r798155 = r798143 + r798154;
        double r798156 = r798151 / r798155;
        double r798157 = r798150 * r798156;
        return r798157;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original23.4
Target18.4
Herbie23.4
\[\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}\]

Derivation

  1. Initial program 23.4

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Using strategy rm
  3. Applied div-inv23.4

    \[\leadsto \color{blue}{\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}}\]
  4. Final simplification23.4

    \[\leadsto \left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}\]

Reproduce

herbie shell --seed 2019353 
(FPCore (x y z t a b)
  :name "Development.Shake.Progress:decay from shake-0.15.5"
  :precision binary64

  :herbie-target
  (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))

  (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))