Average Error: 0.0 → 0.0
Time: 35.2s
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 r522309 = x;
        double r522310 = y;
        double r522311 = z;
        double r522312 = r522310 - r522311;
        double r522313 = t;
        double r522314 = r522313 - r522309;
        double r522315 = r522312 * r522314;
        double r522316 = r522309 + r522315;
        return r522316;
}

double f(double x, double y, double z, double t) {
        double r522317 = x;
        double r522318 = y;
        double r522319 = z;
        double r522320 = r522318 - r522319;
        double r522321 = t;
        double r522322 = r522320 * r522321;
        double r522323 = r522317 + r522322;
        double r522324 = -r522317;
        double r522325 = r522324 * r522320;
        double r522326 = r522323 + r522325;
        return r522326;
}

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