Average Error: 22.8 → 22.8
Time: 18.1s
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 r684343 = x;
        double r684344 = y;
        double r684345 = r684343 * r684344;
        double r684346 = z;
        double r684347 = t;
        double r684348 = a;
        double r684349 = r684347 - r684348;
        double r684350 = r684346 * r684349;
        double r684351 = r684345 + r684350;
        double r684352 = b;
        double r684353 = r684352 - r684344;
        double r684354 = r684346 * r684353;
        double r684355 = r684344 + r684354;
        double r684356 = r684351 / r684355;
        return r684356;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r684357 = x;
        double r684358 = y;
        double r684359 = r684357 * r684358;
        double r684360 = z;
        double r684361 = t;
        double r684362 = a;
        double r684363 = r684361 - r684362;
        double r684364 = r684360 * r684363;
        double r684365 = r684359 + r684364;
        double r684366 = 1.0;
        double r684367 = b;
        double r684368 = r684367 - r684358;
        double r684369 = r684360 * r684368;
        double r684370 = r684358 + r684369;
        double r684371 = r684366 / r684370;
        double r684372 = r684365 * r684371;
        return r684372;
}

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

Original22.8
Target17.5
Herbie22.8
\[\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 22.8

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

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

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