Average Error: 0.0 → 0.0
Time: 12.1s
Precision: 64
\[x + \left(y - z\right) \cdot \left(t - x\right)\]
\[x + \left(t \cdot y + \left(\left(y - z\right) \cdot \left(-x\right) - z \cdot t\right)\right)\]
x + \left(y - z\right) \cdot \left(t - x\right)
x + \left(t \cdot y + \left(\left(y - z\right) \cdot \left(-x\right) - z \cdot t\right)\right)
double f(double x, double y, double z, double t) {
        double r700690 = x;
        double r700691 = y;
        double r700692 = z;
        double r700693 = r700691 - r700692;
        double r700694 = t;
        double r700695 = r700694 - r700690;
        double r700696 = r700693 * r700695;
        double r700697 = r700690 + r700696;
        return r700697;
}

double f(double x, double y, double z, double t) {
        double r700698 = x;
        double r700699 = t;
        double r700700 = y;
        double r700701 = r700699 * r700700;
        double r700702 = z;
        double r700703 = r700700 - r700702;
        double r700704 = -r700698;
        double r700705 = r700703 * r700704;
        double r700706 = r700702 * r700699;
        double r700707 = r700705 - r700706;
        double r700708 = r700701 + r700707;
        double r700709 = r700698 + r700708;
        return r700709;
}

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. Using strategy rm
  7. Applied sub-neg0.0

    \[\leadsto x + \left(t \cdot \color{blue}{\left(y + \left(-z\right)\right)} + \left(y - z\right) \cdot \left(-x\right)\right)\]
  8. Applied distribute-rgt-in0.0

    \[\leadsto x + \left(\color{blue}{\left(y \cdot t + \left(-z\right) \cdot t\right)} + \left(y - z\right) \cdot \left(-x\right)\right)\]
  9. Applied associate-+l+0.0

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

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

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

Reproduce

herbie shell --seed 2019194 
(FPCore (x y z t)
  :name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"

  :herbie-target
  (+ x (+ (* t (- y z)) (* (- x) (- y z))))

  (+ x (* (- y z) (- t x))))