Average Error: 0.0 → 0.0
Time: 10.8s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[\left(t - x\right) \cdot \left(y - z\right) + x\]
x + \left(y - z\right) \cdot \left(t - x\right)
\left(t - x\right) \cdot \left(y - z\right) + x
double f(double x, double y, double z, double t) {
        double r558965 = x;
        double r558966 = y;
        double r558967 = z;
        double r558968 = r558966 - r558967;
        double r558969 = t;
        double r558970 = r558969 - r558965;
        double r558971 = r558968 * r558970;
        double r558972 = r558965 + r558971;
        return r558972;
}

double f(double x, double y, double z, double t) {
        double r558973 = t;
        double r558974 = x;
        double r558975 = r558973 - r558974;
        double r558976 = y;
        double r558977 = z;
        double r558978 = r558976 - r558977;
        double r558979 = r558975 * r558978;
        double r558980 = r558979 + r558974;
        return r558980;
}

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 \left(t - x\right) \cdot \left(y - z\right) + x\]

Reproduce

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