Average Error: 0.0 → 0.0
Time: 3.3s
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 r992875 = x;
        double r992876 = y;
        double r992877 = z;
        double r992878 = r992876 - r992877;
        double r992879 = t;
        double r992880 = r992879 - r992875;
        double r992881 = r992878 * r992880;
        double r992882 = r992875 + r992881;
        return r992882;
}

double f(double x, double y, double z, double t) {
        double r992883 = x;
        double r992884 = t;
        double r992885 = y;
        double r992886 = z;
        double r992887 = r992885 - r992886;
        double r992888 = r992884 * r992887;
        double r992889 = r992883 + r992888;
        double r992890 = -r992883;
        double r992891 = r992887 * r992890;
        double r992892 = r992889 + r992891;
        return r992892;
}

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