Average Error: 0.0 → 0.0
Time: 19.5s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[\left(x + t \cdot \left(y - z\right)\right) + \left(-x\right) \cdot \left(y - z\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
\left(x + t \cdot \left(y - z\right)\right) + \left(-x\right) \cdot \left(y - z\right)
double f(double x, double y, double z, double t) {
        double r706635 = x;
        double r706636 = y;
        double r706637 = z;
        double r706638 = r706636 - r706637;
        double r706639 = t;
        double r706640 = r706639 - r706635;
        double r706641 = r706638 * r706640;
        double r706642 = r706635 + r706641;
        return r706642;
}

double f(double x, double y, double z, double t) {
        double r706643 = x;
        double r706644 = t;
        double r706645 = y;
        double r706646 = z;
        double r706647 = r706645 - r706646;
        double r706648 = r706644 * r706647;
        double r706649 = r706643 + r706648;
        double r706650 = -r706643;
        double r706651 = r706650 * r706647;
        double r706652 = r706649 + r706651;
        return r706652;
}

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

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

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

Reproduce

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