Average Error: 0.0 → 0.0
Time: 18.3s
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 r8041053 = x;
        double r8041054 = y;
        double r8041055 = r8041053 * r8041054;
        double r8041056 = 1.0;
        double r8041057 = r8041053 - r8041056;
        double r8041058 = z;
        double r8041059 = r8041057 * r8041058;
        double r8041060 = r8041055 + r8041059;
        return r8041060;
}

double f(double x, double y, double z) {
        double r8041061 = y;
        double r8041062 = z;
        double r8041063 = r8041061 + r8041062;
        double r8041064 = x;
        double r8041065 = r8041063 * r8041064;
        double r8041066 = 1.0;
        double r8041067 = r8041062 * r8041066;
        double r8041068 = r8041065 - r8041067;
        return r8041068;
}

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

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

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

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

Reproduce

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