Average Error: 0.0 → 0.0
Time: 11.9s
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 r11299358 = x;
        double r11299359 = y;
        double r11299360 = r11299358 * r11299359;
        double r11299361 = 1.0;
        double r11299362 = r11299358 - r11299361;
        double r11299363 = z;
        double r11299364 = r11299362 * r11299363;
        double r11299365 = r11299360 + r11299364;
        return r11299365;
}

double f(double x, double y, double z) {
        double r11299366 = y;
        double r11299367 = z;
        double r11299368 = r11299366 + r11299367;
        double r11299369 = x;
        double r11299370 = r11299368 * r11299369;
        double r11299371 = 1.0;
        double r11299372 = r11299367 * r11299371;
        double r11299373 = r11299370 - r11299372;
        return r11299373;
}

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 2019171 
(FPCore (x y z)
  :name "Graphics.Rendering.Chart.Drawing:drawTextsR from Chart-1.5.3"
  (+ (* x y) (* (- x 1.0) z)))