Average Error: 23.4 → 23.5
Time: 49.2s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{z \cdot \left(b - y\right) + y} \cdot \left(z \cdot \left(t - a\right) + x \cdot y\right)\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{z \cdot \left(b - y\right) + y} \cdot \left(z \cdot \left(t - a\right) + x \cdot y\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r38197221 = x;
        double r38197222 = y;
        double r38197223 = r38197221 * r38197222;
        double r38197224 = z;
        double r38197225 = t;
        double r38197226 = a;
        double r38197227 = r38197225 - r38197226;
        double r38197228 = r38197224 * r38197227;
        double r38197229 = r38197223 + r38197228;
        double r38197230 = b;
        double r38197231 = r38197230 - r38197222;
        double r38197232 = r38197224 * r38197231;
        double r38197233 = r38197222 + r38197232;
        double r38197234 = r38197229 / r38197233;
        return r38197234;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r38197235 = 1.0;
        double r38197236 = z;
        double r38197237 = b;
        double r38197238 = y;
        double r38197239 = r38197237 - r38197238;
        double r38197240 = r38197236 * r38197239;
        double r38197241 = r38197240 + r38197238;
        double r38197242 = r38197235 / r38197241;
        double r38197243 = t;
        double r38197244 = a;
        double r38197245 = r38197243 - r38197244;
        double r38197246 = r38197236 * r38197245;
        double r38197247 = x;
        double r38197248 = r38197247 * r38197238;
        double r38197249 = r38197246 + r38197248;
        double r38197250 = r38197242 * r38197249;
        return r38197250;
}

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.1
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.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.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 \frac{1}{z \cdot \left(b - y\right) + y} \cdot \left(z \cdot \left(t - a\right) + x \cdot y\right)\]

Reproduce

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

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

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