Average Error: 23.6 → 23.6
Time: 16.3s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r579336 = x;
        double r579337 = y;
        double r579338 = r579336 * r579337;
        double r579339 = z;
        double r579340 = t;
        double r579341 = a;
        double r579342 = r579340 - r579341;
        double r579343 = r579339 * r579342;
        double r579344 = r579338 + r579343;
        double r579345 = b;
        double r579346 = r579345 - r579337;
        double r579347 = r579339 * r579346;
        double r579348 = r579337 + r579347;
        double r579349 = r579344 / r579348;
        return r579349;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r579350 = x;
        double r579351 = y;
        double r579352 = r579350 * r579351;
        double r579353 = z;
        double r579354 = t;
        double r579355 = a;
        double r579356 = r579354 - r579355;
        double r579357 = r579353 * r579356;
        double r579358 = r579352 + r579357;
        double r579359 = b;
        double r579360 = r579359 - r579351;
        double r579361 = r579353 * r579360;
        double r579362 = r579351 + r579361;
        double r579363 = r579358 / r579362;
        return r579363;
}

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.6
Target18.2
Herbie23.6
\[\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.6

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

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

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

Reproduce

herbie shell --seed 2019297 
(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)))))