Average Error: 0.0 → 0.0
Time: 2.8s
Precision: 64
\[x \cdot y + z \cdot \left(1 - y\right)\]
\[z \cdot 1 + y \cdot \left(x - z\right)\]
x \cdot y + z \cdot \left(1 - y\right)
z \cdot 1 + y \cdot \left(x - z\right)
double f(double x, double y, double z) {
        double r650742 = x;
        double r650743 = y;
        double r650744 = r650742 * r650743;
        double r650745 = z;
        double r650746 = 1.0;
        double r650747 = r650746 - r650743;
        double r650748 = r650745 * r650747;
        double r650749 = r650744 + r650748;
        return r650749;
}

double f(double x, double y, double z) {
        double r650750 = z;
        double r650751 = 1.0;
        double r650752 = r650750 * r650751;
        double r650753 = y;
        double r650754 = x;
        double r650755 = r650754 - r650750;
        double r650756 = r650753 * r650755;
        double r650757 = r650752 + r650756;
        return r650757;
}

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. Taylor expanded around 0 0.0

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

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

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

Reproduce

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