Average Error: 0.0 → 0.0
Time: 15.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 r37895641 = x;
        double r37895642 = y;
        double r37895643 = z;
        double r37895644 = r37895642 - r37895643;
        double r37895645 = t;
        double r37895646 = r37895645 - r37895641;
        double r37895647 = r37895644 * r37895646;
        double r37895648 = r37895641 + r37895647;
        return r37895648;
}

double f(double x, double y, double z, double t) {
        double r37895649 = x;
        double r37895650 = y;
        double r37895651 = z;
        double r37895652 = r37895650 - r37895651;
        double r37895653 = t;
        double r37895654 = r37895652 * r37895653;
        double r37895655 = -r37895649;
        double r37895656 = r37895652 * r37895655;
        double r37895657 = r37895654 + r37895656;
        double r37895658 = r37895649 + r37895657;
        return r37895658;
}

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 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))))