Average Error: 23.0 → 23.0
Time: 10.8s
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 r632479 = x;
        double r632480 = y;
        double r632481 = r632479 * r632480;
        double r632482 = z;
        double r632483 = t;
        double r632484 = a;
        double r632485 = r632483 - r632484;
        double r632486 = r632482 * r632485;
        double r632487 = r632481 + r632486;
        double r632488 = b;
        double r632489 = r632488 - r632480;
        double r632490 = r632482 * r632489;
        double r632491 = r632480 + r632490;
        double r632492 = r632487 / r632491;
        return r632492;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r632493 = x;
        double r632494 = y;
        double r632495 = r632493 * r632494;
        double r632496 = z;
        double r632497 = t;
        double r632498 = a;
        double r632499 = r632497 - r632498;
        double r632500 = r632496 * r632499;
        double r632501 = r632495 + r632500;
        double r632502 = b;
        double r632503 = r632502 - r632494;
        double r632504 = r632496 * r632503;
        double r632505 = r632494 + r632504;
        double r632506 = r632501 / r632505;
        return r632506;
}

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.0
Target17.8
Herbie23.0
\[\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.0

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

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

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

Reproduce

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