Average Error: 0.0 → 0.0
Time: 10.1s
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 r171655 = x;
        double r171656 = y;
        double r171657 = r171655 * r171656;
        double r171658 = 1.0;
        double r171659 = r171655 - r171658;
        double r171660 = z;
        double r171661 = r171659 * r171660;
        double r171662 = r171657 + r171661;
        return r171662;
}

double f(double x, double y, double z) {
        double r171663 = x;
        double r171664 = z;
        double r171665 = y;
        double r171666 = r171664 + r171665;
        double r171667 = r171663 * r171666;
        double r171668 = 1.0;
        double r171669 = r171668 * r171664;
        double r171670 = r171667 - r171669;
        return r171670;
}

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