Average Error: 0.0 → 0.0
Time: 4.2s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[\left(x + t \cdot \left(y - z\right)\right) + \left(y - z\right) \cdot \left(-x\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
\left(x + t \cdot \left(y - z\right)\right) + \left(y - z\right) \cdot \left(-x\right)
double f(double x, double y, double z, double t) {
        double r790396 = x;
        double r790397 = y;
        double r790398 = z;
        double r790399 = r790397 - r790398;
        double r790400 = t;
        double r790401 = r790400 - r790396;
        double r790402 = r790399 * r790401;
        double r790403 = r790396 + r790402;
        return r790403;
}

double f(double x, double y, double z, double t) {
        double r790404 = x;
        double r790405 = t;
        double r790406 = y;
        double r790407 = z;
        double r790408 = r790406 - r790407;
        double r790409 = r790405 * r790408;
        double r790410 = r790404 + r790409;
        double r790411 = -r790404;
        double r790412 = r790408 * r790411;
        double r790413 = r790410 + r790412;
        return r790413;
}

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. Applied associate-+r+0.0

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

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

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

Reproduce

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