Average Error: 23.3 → 23.3
Time: 5.8s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\frac{x \cdot y + \left(t - a\right) \cdot z}{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 + \left(t - a\right) \cdot z}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r707811 = x;
        double r707812 = y;
        double r707813 = r707811 * r707812;
        double r707814 = z;
        double r707815 = t;
        double r707816 = a;
        double r707817 = r707815 - r707816;
        double r707818 = r707814 * r707817;
        double r707819 = r707813 + r707818;
        double r707820 = b;
        double r707821 = r707820 - r707812;
        double r707822 = r707814 * r707821;
        double r707823 = r707812 + r707822;
        double r707824 = r707819 / r707823;
        return r707824;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r707825 = x;
        double r707826 = y;
        double r707827 = r707825 * r707826;
        double r707828 = t;
        double r707829 = a;
        double r707830 = r707828 - r707829;
        double r707831 = z;
        double r707832 = r707830 * r707831;
        double r707833 = r707827 + r707832;
        double r707834 = b;
        double r707835 = r707834 - r707826;
        double r707836 = r707831 * r707835;
        double r707837 = r707826 + r707836;
        double r707838 = r707833 / r707837;
        return r707838;
}

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

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

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

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

Reproduce

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