Average Error: 0.0 → 0.0
Time: 14.2s
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 r473843 = x;
        double r473844 = y;
        double r473845 = z;
        double r473846 = r473844 - r473845;
        double r473847 = t;
        double r473848 = r473847 - r473843;
        double r473849 = r473846 * r473848;
        double r473850 = r473843 + r473849;
        return r473850;
}

double f(double x, double y, double z, double t) {
        double r473851 = x;
        double r473852 = t;
        double r473853 = y;
        double r473854 = z;
        double r473855 = r473853 - r473854;
        double r473856 = r473852 * r473855;
        double r473857 = r473851 + r473856;
        double r473858 = -r473851;
        double r473859 = r473858 * r473855;
        double r473860 = r473857 + r473859;
        return r473860;
}

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