Average Error: 22.8 → 22.8
Time: 12.2s
Precision: 64
\[\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\]
\[\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}\]
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\left(x \cdot y + z \cdot \left(t - a\right)\right) \cdot \frac{1}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r764711 = x;
        double r764712 = y;
        double r764713 = r764711 * r764712;
        double r764714 = z;
        double r764715 = t;
        double r764716 = a;
        double r764717 = r764715 - r764716;
        double r764718 = r764714 * r764717;
        double r764719 = r764713 + r764718;
        double r764720 = b;
        double r764721 = r764720 - r764712;
        double r764722 = r764714 * r764721;
        double r764723 = r764712 + r764722;
        double r764724 = r764719 / r764723;
        return r764724;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r764725 = x;
        double r764726 = y;
        double r764727 = r764725 * r764726;
        double r764728 = z;
        double r764729 = t;
        double r764730 = a;
        double r764731 = r764729 - r764730;
        double r764732 = r764728 * r764731;
        double r764733 = r764727 + r764732;
        double r764734 = 1.0;
        double r764735 = b;
        double r764736 = r764735 - r764726;
        double r764737 = r764728 * r764736;
        double r764738 = r764726 + r764737;
        double r764739 = r764734 / r764738;
        double r764740 = r764733 * r764739;
        return r764740;
}

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.8
Target17.5
Herbie22.8
\[\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.8

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

    \[\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 simplification22.8

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

Reproduce

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