Average Error: 0.0 → 0.0
Time: 1.5s
Precision: 64
\[\left(x + y\right) \cdot \left(z + 1\right)\]
\[z \cdot x + \left(y \cdot z + 1 \cdot \left(x + y\right)\right)\]
\left(x + y\right) \cdot \left(z + 1\right)
z \cdot x + \left(y \cdot z + 1 \cdot \left(x + y\right)\right)
double f(double x, double y, double z) {
        double r31415 = x;
        double r31416 = y;
        double r31417 = r31415 + r31416;
        double r31418 = z;
        double r31419 = 1.0;
        double r31420 = r31418 + r31419;
        double r31421 = r31417 * r31420;
        return r31421;
}

double f(double x, double y, double z) {
        double r31422 = z;
        double r31423 = x;
        double r31424 = r31422 * r31423;
        double r31425 = y;
        double r31426 = r31425 * r31422;
        double r31427 = 1.0;
        double r31428 = r31423 + r31425;
        double r31429 = r31427 * r31428;
        double r31430 = r31426 + r31429;
        double r31431 = r31424 + r31430;
        return r31431;
}

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

    \[\left(x + y\right) \cdot \left(z + 1\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in0.0

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

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

    \[\leadsto z \cdot \left(x + y\right) + \color{blue}{1 \cdot \left(x + y\right)}\]
  6. Using strategy rm
  7. Applied distribute-lft-in0.0

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

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

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

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

Reproduce

herbie shell --seed 2020100 
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, G"
  :precision binary64
  (* (+ x y) (+ z 1)))