Average Error: 0.0 → 0.0
Time: 24.9s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[\left(x + t \cdot \left(y - z\right)\right) + \left(y - z\right) \cdot \left(-x\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
\left(x + t \cdot \left(y - z\right)\right) + \left(y - z\right) \cdot \left(-x\right)
double f(double x, double y, double z, double t) {
        double r816463 = x;
        double r816464 = y;
        double r816465 = z;
        double r816466 = r816464 - r816465;
        double r816467 = t;
        double r816468 = r816467 - r816463;
        double r816469 = r816466 * r816468;
        double r816470 = r816463 + r816469;
        return r816470;
}

double f(double x, double y, double z, double t) {
        double r816471 = x;
        double r816472 = t;
        double r816473 = y;
        double r816474 = z;
        double r816475 = r816473 - r816474;
        double r816476 = r816472 * r816475;
        double r816477 = r816471 + r816476;
        double r816478 = -r816471;
        double r816479 = r816475 * r816478;
        double r816480 = r816477 + r816479;
        return r816480;
}

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. Applied associate-+r+0.0

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

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

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

Reproduce

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