Average Error: 0.0 → 0.0
Time: 10.6s
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 r562037 = x;
        double r562038 = y;
        double r562039 = z;
        double r562040 = r562038 - r562039;
        double r562041 = t;
        double r562042 = r562041 - r562037;
        double r562043 = r562040 * r562042;
        double r562044 = r562037 + r562043;
        return r562044;
}

double f(double x, double y, double z, double t) {
        double r562045 = t;
        double r562046 = x;
        double r562047 = r562045 - r562046;
        double r562048 = y;
        double r562049 = z;
        double r562050 = r562048 - r562049;
        double r562051 = r562047 * r562050;
        double r562052 = r562051 + r562046;
        return r562052;
}

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