Average Error: 23.0 → 23.0
Time: 15.4s
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 \cdot z + z \cdot \left(-a\right)\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 + \left(t \cdot z + z \cdot \left(-a\right)\right)}{y + z \cdot \left(b - y\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r626237 = x;
        double r626238 = y;
        double r626239 = r626237 * r626238;
        double r626240 = z;
        double r626241 = t;
        double r626242 = a;
        double r626243 = r626241 - r626242;
        double r626244 = r626240 * r626243;
        double r626245 = r626239 + r626244;
        double r626246 = b;
        double r626247 = r626246 - r626238;
        double r626248 = r626240 * r626247;
        double r626249 = r626238 + r626248;
        double r626250 = r626245 / r626249;
        return r626250;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r626251 = x;
        double r626252 = y;
        double r626253 = r626251 * r626252;
        double r626254 = t;
        double r626255 = z;
        double r626256 = r626254 * r626255;
        double r626257 = a;
        double r626258 = -r626257;
        double r626259 = r626255 * r626258;
        double r626260 = r626256 + r626259;
        double r626261 = r626253 + r626260;
        double r626262 = b;
        double r626263 = r626262 - r626252;
        double r626264 = r626255 * r626263;
        double r626265 = r626252 + r626264;
        double r626266 = r626261 / r626265;
        return r626266;
}

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.0
\[\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 sub-neg23.0

    \[\leadsto \frac{x \cdot y + z \cdot \color{blue}{\left(t + \left(-a\right)\right)}}{y + z \cdot \left(b - y\right)}\]
  4. Applied distribute-lft-in23.0

    \[\leadsto \frac{x \cdot y + \color{blue}{\left(z \cdot t + z \cdot \left(-a\right)\right)}}{y + z \cdot \left(b - y\right)}\]
  5. Simplified23.0

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

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

Reproduce

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