Average Error: 0.0 → 0.0
Time: 10.0s
Precision: 64
\[x \cdot y + \left(x - 1\right) \cdot z\]
\[x \cdot \left(z + y\right) - 1 \cdot z\]
x \cdot y + \left(x - 1\right) \cdot z
x \cdot \left(z + y\right) - 1 \cdot z
double f(double x, double y, double z) {
        double r95351 = x;
        double r95352 = y;
        double r95353 = r95351 * r95352;
        double r95354 = 1.0;
        double r95355 = r95351 - r95354;
        double r95356 = z;
        double r95357 = r95355 * r95356;
        double r95358 = r95353 + r95357;
        return r95358;
}

double f(double x, double y, double z) {
        double r95359 = x;
        double r95360 = z;
        double r95361 = y;
        double r95362 = r95360 + r95361;
        double r95363 = r95359 * r95362;
        double r95364 = 1.0;
        double r95365 = r95364 * r95360;
        double r95366 = r95363 - r95365;
        return r95366;
}

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--8.1

    \[\leadsto x \cdot y + \color{blue}{\frac{x \cdot x - 1 \cdot 1}{x + 1}} \cdot z\]
  4. Applied associate-*l/10.3

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

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

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

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

Reproduce

herbie shell --seed 2019326 
(FPCore (x y z)
  :name "Graphics.Rendering.Chart.Drawing:drawTextsR from Chart-1.5.3"
  :precision binary64
  (+ (* x y) (* (- x 1) z)))