Average Error: 0.0 → 0.0
Time: 37.7s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[\left(-x\right) \cdot \left(y - z\right) + \left(t \cdot \left(y - z\right) + x\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
\left(-x\right) \cdot \left(y - z\right) + \left(t \cdot \left(y - z\right) + x\right)
double f(double x, double y, double z, double t) {
        double r40928904 = x;
        double r40928905 = y;
        double r40928906 = z;
        double r40928907 = r40928905 - r40928906;
        double r40928908 = t;
        double r40928909 = r40928908 - r40928904;
        double r40928910 = r40928907 * r40928909;
        double r40928911 = r40928904 + r40928910;
        return r40928911;
}

double f(double x, double y, double z, double t) {
        double r40928912 = x;
        double r40928913 = -r40928912;
        double r40928914 = y;
        double r40928915 = z;
        double r40928916 = r40928914 - r40928915;
        double r40928917 = r40928913 * r40928916;
        double r40928918 = t;
        double r40928919 = r40928918 * r40928916;
        double r40928920 = r40928919 + r40928912;
        double r40928921 = r40928917 + r40928920;
        return r40928921;
}

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

Reproduce

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