Average Error: 0.0 → 0.0
Time: 2.7s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[\left(x + t \cdot \left(y - z\right)\right) + \left(y - z\right) \cdot \left(-x\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
\left(x + t \cdot \left(y - z\right)\right) + \left(y - z\right) \cdot \left(-x\right)
double f(double x, double y, double z, double t) {
        double r863656 = x;
        double r863657 = y;
        double r863658 = z;
        double r863659 = r863657 - r863658;
        double r863660 = t;
        double r863661 = r863660 - r863656;
        double r863662 = r863659 * r863661;
        double r863663 = r863656 + r863662;
        return r863663;
}

double f(double x, double y, double z, double t) {
        double r863664 = x;
        double r863665 = t;
        double r863666 = y;
        double r863667 = z;
        double r863668 = r863666 - r863667;
        double r863669 = r863665 * r863668;
        double r863670 = r863664 + r863669;
        double r863671 = -r863664;
        double r863672 = r863668 * r863671;
        double r863673 = r863670 + r863672;
        return r863673;
}

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

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

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

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

Reproduce

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