Average Error: 0.0 → 0.0
Time: 13.8s
Precision: 64
\[x \cdot y + \left(x - 1\right) \cdot z\]
\[1 \cdot \left(x \cdot \left(z + y\right) - z\right)\]
x \cdot y + \left(x - 1\right) \cdot z
1 \cdot \left(x \cdot \left(z + y\right) - z\right)
double f(double x, double y, double z) {
        double r9451070 = x;
        double r9451071 = y;
        double r9451072 = r9451070 * r9451071;
        double r9451073 = 1.0;
        double r9451074 = r9451070 - r9451073;
        double r9451075 = z;
        double r9451076 = r9451074 * r9451075;
        double r9451077 = r9451072 + r9451076;
        return r9451077;
}

double f(double x, double y, double z) {
        double r9451078 = 1.0;
        double r9451079 = x;
        double r9451080 = z;
        double r9451081 = y;
        double r9451082 = r9451080 + r9451081;
        double r9451083 = r9451079 * r9451082;
        double r9451084 = r9451083 - r9451080;
        double r9451085 = r9451078 * r9451084;
        return r9451085;
}

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. Using strategy rm
  3. Applied flip-+29.7

    \[\leadsto \color{blue}{\frac{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - \left(\left(x - 1\right) \cdot z\right) \cdot \left(\left(x - 1\right) \cdot z\right)}{x \cdot y - \left(x - 1\right) \cdot z}}\]
  4. Taylor expanded around 0 0.0

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

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

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

Reproduce

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