Average Error: 22.9 → 22.9
Time: 17.4s
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 r502317 = x;
        double r502318 = y;
        double r502319 = r502317 * r502318;
        double r502320 = z;
        double r502321 = t;
        double r502322 = a;
        double r502323 = r502321 - r502322;
        double r502324 = r502320 * r502323;
        double r502325 = r502319 + r502324;
        double r502326 = b;
        double r502327 = r502326 - r502318;
        double r502328 = r502320 * r502327;
        double r502329 = r502318 + r502328;
        double r502330 = r502325 / r502329;
        return r502330;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r502331 = x;
        double r502332 = y;
        double r502333 = r502331 * r502332;
        double r502334 = z;
        double r502335 = t;
        double r502336 = a;
        double r502337 = r502335 - r502336;
        double r502338 = r502334 * r502337;
        double r502339 = r502333 + r502338;
        double r502340 = b;
        double r502341 = r502340 - r502332;
        double r502342 = r502334 * r502341;
        double r502343 = r502332 + r502342;
        double r502344 = r502339 / r502343;
        return r502344;
}

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.9
Target18.0
Herbie22.9
\[\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.9

    \[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
  2. Final simplification22.9

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

Reproduce

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