Average Error: 0.0 → 0.0
Time: 20.1s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[x + \left(\left(y \cdot t + \left(-z\right) \cdot t\right) + \left(-x\right) \cdot \left(y - z\right)\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
x + \left(\left(y \cdot t + \left(-z\right) \cdot t\right) + \left(-x\right) \cdot \left(y - z\right)\right)
double f(double x, double y, double z, double t) {
        double r554961 = x;
        double r554962 = y;
        double r554963 = z;
        double r554964 = r554962 - r554963;
        double r554965 = t;
        double r554966 = r554965 - r554961;
        double r554967 = r554964 * r554966;
        double r554968 = r554961 + r554967;
        return r554968;
}

double f(double x, double y, double z, double t) {
        double r554969 = x;
        double r554970 = y;
        double r554971 = t;
        double r554972 = r554970 * r554971;
        double r554973 = z;
        double r554974 = -r554973;
        double r554975 = r554974 * r554971;
        double r554976 = r554972 + r554975;
        double r554977 = -r554969;
        double r554978 = r554970 - r554973;
        double r554979 = r554977 * r554978;
        double r554980 = r554976 + r554979;
        double r554981 = r554969 + r554980;
        return r554981;
}

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

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

    \[\leadsto x + \left(t \cdot \left(y - z\right) + \color{blue}{\left(-x \cdot \left(y - z\right)\right)}\right)\]
  7. Using strategy rm
  8. Applied sub-neg0.0

    \[\leadsto x + \left(t \cdot \color{blue}{\left(y + \left(-z\right)\right)} + \left(-x \cdot \left(y - z\right)\right)\right)\]
  9. Applied distribute-lft-in0.0

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

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

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

Reproduce

herbie shell --seed 2019195 
(FPCore (x y z t)
  :name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"

  :herbie-target
  (+ x (+ (* t (- y z)) (* (- x) (- y z))))

  (+ x (* (- y z) (- t x))))