Average Error: 23.0 → 23.1
Time: 12.7s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{1}{\frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\frac{1}{\frac{y + z \cdot \left(b - y\right)}{x \cdot y + z \cdot \left(t - a\right)}}
double f(double x, double y, double z, double t, double a, double b) {
        double r809641 = x;
        double r809642 = y;
        double r809643 = r809641 * r809642;
        double r809644 = z;
        double r809645 = t;
        double r809646 = a;
        double r809647 = r809645 - r809646;
        double r809648 = r809644 * r809647;
        double r809649 = r809643 + r809648;
        double r809650 = b;
        double r809651 = r809650 - r809642;
        double r809652 = r809644 * r809651;
        double r809653 = r809642 + r809652;
        double r809654 = r809649 / r809653;
        return r809654;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r809655 = 1.0;
        double r809656 = y;
        double r809657 = z;
        double r809658 = b;
        double r809659 = r809658 - r809656;
        double r809660 = r809657 * r809659;
        double r809661 = r809656 + r809660;
        double r809662 = x;
        double r809663 = r809662 * r809656;
        double r809664 = t;
        double r809665 = a;
        double r809666 = r809664 - r809665;
        double r809667 = r809657 * r809666;
        double r809668 = r809663 + r809667;
        double r809669 = r809661 / r809668;
        double r809670 = r809655 / r809669;
        return r809670;
}

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

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

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

Reproduce

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