Average Error: 0.0 → 0.0
Time: 13.2s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[x + \left(\left(y - z\right) \cdot t + \left(y - z\right) \cdot \left(-x\right)\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
x + \left(\left(y - z\right) \cdot t + \left(y - z\right) \cdot \left(-x\right)\right)
double f(double x, double y, double z, double t) {
        double r35232729 = x;
        double r35232730 = y;
        double r35232731 = z;
        double r35232732 = r35232730 - r35232731;
        double r35232733 = t;
        double r35232734 = r35232733 - r35232729;
        double r35232735 = r35232732 * r35232734;
        double r35232736 = r35232729 + r35232735;
        return r35232736;
}

double f(double x, double y, double z, double t) {
        double r35232737 = x;
        double r35232738 = y;
        double r35232739 = z;
        double r35232740 = r35232738 - r35232739;
        double r35232741 = t;
        double r35232742 = r35232740 * r35232741;
        double r35232743 = -r35232737;
        double r35232744 = r35232740 * r35232743;
        double r35232745 = r35232742 + r35232744;
        double r35232746 = r35232737 + r35232745;
        return r35232746;
}

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(y - z\right) \cdot t + \left(y - z\right) \cdot \left(-x\right)\right)\]

Reproduce

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