Average Error: 0.0 → 0.0
Time: 6.8s
Precision: 64
\[x \cdot y + z \cdot \left(1 - y\right)\]
\[x \cdot y + \left(z \cdot 1 + z \cdot \left(-y\right)\right)\]
x \cdot y + z \cdot \left(1 - y\right)
x \cdot y + \left(z \cdot 1 + z \cdot \left(-y\right)\right)
double f(double x, double y, double z) {
        double r700553 = x;
        double r700554 = y;
        double r700555 = r700553 * r700554;
        double r700556 = z;
        double r700557 = 1.0;
        double r700558 = r700557 - r700554;
        double r700559 = r700556 * r700558;
        double r700560 = r700555 + r700559;
        return r700560;
}

double f(double x, double y, double z) {
        double r700561 = x;
        double r700562 = y;
        double r700563 = r700561 * r700562;
        double r700564 = z;
        double r700565 = 1.0;
        double r700566 = r700564 * r700565;
        double r700567 = -r700562;
        double r700568 = r700564 * r700567;
        double r700569 = r700566 + r700568;
        double r700570 = r700563 + r700569;
        return r700570;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[z - \left(z - x\right) \cdot y\]

Derivation

  1. Initial program 0.0

    \[x \cdot y + z \cdot \left(1 - y\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto x \cdot y + z \cdot \color{blue}{\left(1 + \left(-y\right)\right)}\]
  4. Applied distribute-lft-in0.0

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

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

Reproduce

herbie shell --seed 2019350 
(FPCore (x y z)
  :name "Diagrams.TwoD.Segment:bezierClip from diagrams-lib-1.3.0.3"
  :precision binary64

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

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