Average Error: 0.0 → 0.0
Time: 4.7s
Precision: 64
\[x \cdot y + \left(x - 1\right) \cdot z\]
\[\left(y + z\right) \cdot x - z \cdot 1\]
x \cdot y + \left(x - 1\right) \cdot z
\left(y + z\right) \cdot x - z \cdot 1
double f(double x, double y, double z) {
        double r119680 = x;
        double r119681 = y;
        double r119682 = r119680 * r119681;
        double r119683 = 1.0;
        double r119684 = r119680 - r119683;
        double r119685 = z;
        double r119686 = r119684 * r119685;
        double r119687 = r119682 + r119686;
        return r119687;
}

double f(double x, double y, double z) {
        double r119688 = y;
        double r119689 = z;
        double r119690 = r119688 + r119689;
        double r119691 = x;
        double r119692 = r119690 * r119691;
        double r119693 = 1.0;
        double r119694 = r119689 * r119693;
        double r119695 = r119692 - r119694;
        return r119695;
}

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

Derivation

  1. Initial program 0.0

    \[x \cdot y + \left(x - 1\right) \cdot z\]
  2. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019195 
(FPCore (x y z)
  :name "Graphics.Rendering.Chart.Drawing:drawTextsR from Chart-1.5.3"
  (+ (* x y) (* (- x 1.0) z)))