Average Error: 23.5 → 23.5
Time: 6.6s
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 r921249 = x;
        double r921250 = y;
        double r921251 = r921249 * r921250;
        double r921252 = z;
        double r921253 = t;
        double r921254 = a;
        double r921255 = r921253 - r921254;
        double r921256 = r921252 * r921255;
        double r921257 = r921251 + r921256;
        double r921258 = b;
        double r921259 = r921258 - r921250;
        double r921260 = r921252 * r921259;
        double r921261 = r921250 + r921260;
        double r921262 = r921257 / r921261;
        return r921262;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r921263 = x;
        double r921264 = y;
        double r921265 = r921263 * r921264;
        double r921266 = z;
        double r921267 = t;
        double r921268 = a;
        double r921269 = r921267 - r921268;
        double r921270 = r921266 * r921269;
        double r921271 = r921265 + r921270;
        double r921272 = 1.0;
        double r921273 = b;
        double r921274 = r921273 - r921264;
        double r921275 = r921266 * r921274;
        double r921276 = r921264 + r921275;
        double r921277 = r921272 / r921276;
        double r921278 = r921271 * r921277;
        return r921278;
}

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.5
Target18.4
Herbie23.5
\[\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.5

    \[\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.5

    \[\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.5

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