Average Error: 0.0 → 0.0
Time: 12.2s
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 r138811 = x;
        double r138812 = y;
        double r138813 = r138811 * r138812;
        double r138814 = 1.0;
        double r138815 = r138811 - r138814;
        double r138816 = z;
        double r138817 = r138815 * r138816;
        double r138818 = r138813 + r138817;
        return r138818;
}

double f(double x, double y, double z) {
        double r138819 = 1.0;
        double r138820 = x;
        double r138821 = z;
        double r138822 = y;
        double r138823 = r138821 + r138822;
        double r138824 = r138820 * r138823;
        double r138825 = r138824 - r138821;
        double r138826 = r138819 * r138825;
        return r138826;
}

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-+41.0

    \[\leadsto \color{blue}{\frac{{\left(x \cdot y\right)}^{3} + {\left(\left(x - 1\right) \cdot z\right)}^{3}}{\left(x \cdot y\right) \cdot \left(x \cdot y\right) + \left(\left(\left(x - 1\right) \cdot z\right) \cdot \left(\left(x - 1\right) \cdot z\right) - \left(x \cdot y\right) \cdot \left(\left(x - 1\right) \cdot z\right)\right)}}\]
  4. Simplified41.0

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

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

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

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

Reproduce

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