Average Error: 0.0 → 0.0
Time: 37.1s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[x + \left(\left(\left(y - z\right) \cdot t + x \cdot z\right) + \left(-y\right) \cdot x\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
x + \left(\left(\left(y - z\right) \cdot t + x \cdot z\right) + \left(-y\right) \cdot x\right)
double f(double x, double y, double z, double t) {
        double r623374 = x;
        double r623375 = y;
        double r623376 = z;
        double r623377 = r623375 - r623376;
        double r623378 = t;
        double r623379 = r623378 - r623374;
        double r623380 = r623377 * r623379;
        double r623381 = r623374 + r623380;
        return r623381;
}

double f(double x, double y, double z, double t) {
        double r623382 = x;
        double r623383 = y;
        double r623384 = z;
        double r623385 = r623383 - r623384;
        double r623386 = t;
        double r623387 = r623385 * r623386;
        double r623388 = r623382 * r623384;
        double r623389 = r623387 + r623388;
        double r623390 = -r623383;
        double r623391 = r623390 * r623382;
        double r623392 = r623389 + r623391;
        double r623393 = r623382 + r623392;
        return r623393;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)\]

Derivation

  1. Initial program 0.0

    \[x + \left(y - z\right) \cdot \left(t - x\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

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

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

    \[\leadsto x + \left(\left(y - z\right) \cdot t + \color{blue}{x \cdot \left(z - y\right)}\right)\]
  6. Using strategy rm
  7. Applied sub-neg0.0

    \[\leadsto x + \left(\left(y - z\right) \cdot t + x \cdot \color{blue}{\left(z + \left(-y\right)\right)}\right)\]
  8. Applied distribute-rgt-in0.0

    \[\leadsto x + \left(\left(y - z\right) \cdot t + \color{blue}{\left(z \cdot x + \left(-y\right) \cdot x\right)}\right)\]
  9. Applied associate-+r+0.0

    \[\leadsto x + \color{blue}{\left(\left(\left(y - z\right) \cdot t + z \cdot x\right) + \left(-y\right) \cdot x\right)}\]
  10. Simplified0.0

    \[\leadsto x + \left(\color{blue}{\left(\left(y - z\right) \cdot t + x \cdot z\right)} + \left(-y\right) \cdot x\right)\]
  11. Final simplification0.0

    \[\leadsto x + \left(\left(\left(y - z\right) \cdot t + x \cdot z\right) + \left(-y\right) \cdot x\right)\]

Reproduce

herbie shell --seed 2019306 
(FPCore (x y z t)
  :name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
  :precision binary64

  :herbie-target
  (+ x (+ (* t (- y z)) (* (- x) (- y z))))

  (+ x (* (- y z) (- t x))))