Average Error: 0.0 → 0.0
Time: 22.4s
Precision: 64
\[x \cdot y + \left(x - 1\right) \cdot z\]
\[x \cdot \left(y + 1 \cdot z\right) - 1 \cdot z\]
x \cdot y + \left(x - 1\right) \cdot z
x \cdot \left(y + 1 \cdot z\right) - 1 \cdot z
double f(double x, double y, double z) {
        double r29121007 = x;
        double r29121008 = y;
        double r29121009 = r29121007 * r29121008;
        double r29121010 = 1.0;
        double r29121011 = r29121007 - r29121010;
        double r29121012 = z;
        double r29121013 = r29121011 * r29121012;
        double r29121014 = r29121009 + r29121013;
        return r29121014;
}

double f(double x, double y, double z) {
        double r29121015 = x;
        double r29121016 = y;
        double r29121017 = 1.0;
        double r29121018 = z;
        double r29121019 = r29121017 * r29121018;
        double r29121020 = r29121016 + r29121019;
        double r29121021 = r29121015 * r29121020;
        double r29121022 = r29121021 - r29121019;
        return r29121022;
}

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

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

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

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

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

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

Reproduce

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