Average Error: 0.0 → 0.0
Time: 6.5s
Precision: 64
\[x \cdot y + \left(x - 1\right) \cdot z\]
\[z \cdot x + \left(x \cdot y - 1 \cdot z\right)\]
x \cdot y + \left(x - 1\right) \cdot z
z \cdot x + \left(x \cdot y - 1 \cdot z\right)
double f(double x, double y, double z) {
        double r176877 = x;
        double r176878 = y;
        double r176879 = r176877 * r176878;
        double r176880 = 1.0;
        double r176881 = r176877 - r176880;
        double r176882 = z;
        double r176883 = r176881 * r176882;
        double r176884 = r176879 + r176883;
        return r176884;
}

double f(double x, double y, double z) {
        double r176885 = z;
        double r176886 = x;
        double r176887 = r176885 * r176886;
        double r176888 = y;
        double r176889 = r176886 * r176888;
        double r176890 = 1.0;
        double r176891 = r176890 * r176885;
        double r176892 = r176889 - r176891;
        double r176893 = r176887 + r176892;
        return r176893;
}

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 flip3--12.4

    \[\leadsto x \cdot y + \color{blue}{\frac{{x}^{3} - {1}^{3}}{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}} \cdot z\]
  4. Applied associate-*l/14.3

    \[\leadsto x \cdot y + \color{blue}{\frac{\left({x}^{3} - {1}^{3}\right) \cdot z}{x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)}}\]
  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. Using strategy rm
  8. Applied distribute-rgt-in0.0

    \[\leadsto \color{blue}{\left(z \cdot x + y \cdot x\right)} - 1 \cdot z\]
  9. Applied associate--l+0.0

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

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

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

Reproduce

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