Average Error: 0.0 → 0.0
Time: 9.5s
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 r7678329 = x;
        double r7678330 = y;
        double r7678331 = r7678329 * r7678330;
        double r7678332 = 1.0;
        double r7678333 = r7678329 - r7678332;
        double r7678334 = z;
        double r7678335 = r7678333 * r7678334;
        double r7678336 = r7678331 + r7678335;
        return r7678336;
}

double f(double x, double y, double z) {
        double r7678337 = y;
        double r7678338 = z;
        double r7678339 = r7678337 + r7678338;
        double r7678340 = x;
        double r7678341 = r7678339 * r7678340;
        double r7678342 = 1.0;
        double r7678343 = r7678338 * r7678342;
        double r7678344 = r7678341 - r7678343;
        return r7678344;
}

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) - z \cdot 1}\]
  4. Final simplification0.0

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

Reproduce

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