Average Error: 0.0 → 0.0
Time: 14.8s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)
double f(double x, double y, double z, double t) {
        double r39494005 = x;
        double r39494006 = y;
        double r39494007 = z;
        double r39494008 = r39494006 - r39494007;
        double r39494009 = t;
        double r39494010 = r39494009 - r39494005;
        double r39494011 = r39494008 * r39494010;
        double r39494012 = r39494005 + r39494011;
        return r39494012;
}

double f(double x, double y, double z, double t) {
        double r39494013 = x;
        double r39494014 = t;
        double r39494015 = y;
        double r39494016 = z;
        double r39494017 = r39494015 - r39494016;
        double r39494018 = r39494014 * r39494017;
        double r39494019 = -r39494013;
        double r39494020 = r39494019 * r39494017;
        double r39494021 = r39494018 + r39494020;
        double r39494022 = r39494013 + r39494021;
        return r39494022;
}

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-rgt-in0.0

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

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

Reproduce

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