Average Error: 0.0 → 0.0
Time: 33.8s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[\left(x + \left(y - z\right) \cdot t\right) + \left(-x\right) \cdot \left(y - z\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
\left(x + \left(y - z\right) \cdot t\right) + \left(-x\right) \cdot \left(y - z\right)
double f(double x, double y, double z, double t) {
        double r554916 = x;
        double r554917 = y;
        double r554918 = z;
        double r554919 = r554917 - r554918;
        double r554920 = t;
        double r554921 = r554920 - r554916;
        double r554922 = r554919 * r554921;
        double r554923 = r554916 + r554922;
        return r554923;
}

double f(double x, double y, double z, double t) {
        double r554924 = x;
        double r554925 = y;
        double r554926 = z;
        double r554927 = r554925 - r554926;
        double r554928 = t;
        double r554929 = r554927 * r554928;
        double r554930 = r554924 + r554929;
        double r554931 = -r554924;
        double r554932 = r554931 * r554927;
        double r554933 = r554930 + r554932;
        return r554933;
}

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. Simplified0.0

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

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

Reproduce

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