Average Error: 23.3 → 23.3
Time: 18.7s
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 r521822 = x;
        double r521823 = y;
        double r521824 = r521822 * r521823;
        double r521825 = z;
        double r521826 = t;
        double r521827 = a;
        double r521828 = r521826 - r521827;
        double r521829 = r521825 * r521828;
        double r521830 = r521824 + r521829;
        double r521831 = b;
        double r521832 = r521831 - r521823;
        double r521833 = r521825 * r521832;
        double r521834 = r521823 + r521833;
        double r521835 = r521830 / r521834;
        return r521835;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r521836 = x;
        double r521837 = y;
        double r521838 = r521836 * r521837;
        double r521839 = z;
        double r521840 = t;
        double r521841 = a;
        double r521842 = r521840 - r521841;
        double r521843 = r521839 * r521842;
        double r521844 = r521838 + r521843;
        double r521845 = 1.0;
        double r521846 = b;
        double r521847 = r521846 - r521837;
        double r521848 = r521839 * r521847;
        double r521849 = r521837 + r521848;
        double r521850 = r521845 / r521849;
        double r521851 = r521844 * r521850;
        return r521851;
}

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
Target18.1
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 div-inv23.3

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

    \[\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 2019326 
(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)))))