Average Error: 0.0 → 0.0
Time: 57.5s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[x + \left(\left(-x\right) \cdot \left(y - z\right) + t \cdot \left(y - z\right)\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
x + \left(\left(-x\right) \cdot \left(y - z\right) + t \cdot \left(y - z\right)\right)
double f(double x, double y, double z, double t) {
        double r43156051 = x;
        double r43156052 = y;
        double r43156053 = z;
        double r43156054 = r43156052 - r43156053;
        double r43156055 = t;
        double r43156056 = r43156055 - r43156051;
        double r43156057 = r43156054 * r43156056;
        double r43156058 = r43156051 + r43156057;
        return r43156058;
}

double f(double x, double y, double z, double t) {
        double r43156059 = x;
        double r43156060 = -r43156059;
        double r43156061 = y;
        double r43156062 = z;
        double r43156063 = r43156061 - r43156062;
        double r43156064 = r43156060 * r43156063;
        double r43156065 = t;
        double r43156066 = r43156065 * r43156063;
        double r43156067 = r43156064 + r43156066;
        double r43156068 = r43156059 + r43156067;
        return r43156068;
}

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. Final simplification0.0

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

Reproduce

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

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

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