Average Error: 0.0 → 0.0
Time: 30.5s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[x + \left(t \cdot \left(y - z\right) + \left(y - z\right) \cdot \left(-x\right)\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
x + \left(t \cdot \left(y - z\right) + \left(y - z\right) \cdot \left(-x\right)\right)
double f(double x, double y, double z, double t) {
        double r816824 = x;
        double r816825 = y;
        double r816826 = z;
        double r816827 = r816825 - r816826;
        double r816828 = t;
        double r816829 = r816828 - r816824;
        double r816830 = r816827 * r816829;
        double r816831 = r816824 + r816830;
        return r816831;
}

double f(double x, double y, double z, double t) {
        double r816832 = x;
        double r816833 = t;
        double r816834 = y;
        double r816835 = z;
        double r816836 = r816834 - r816835;
        double r816837 = r816833 * r816836;
        double r816838 = -r816832;
        double r816839 = r816836 * r816838;
        double r816840 = r816837 + r816839;
        double r816841 = r816832 + r816840;
        return r816841;
}

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. Final simplification0.0

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

Reproduce

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