Average Error: 0.0 → 0.0
Time: 1.1s
Precision: 64
\[\left(x + y\right) \cdot \left(z + 1\right)\]
\[\left(z \cdot x + z \cdot y\right) + 1 \cdot \left(x + y\right)\]
\left(x + y\right) \cdot \left(z + 1\right)
\left(z \cdot x + z \cdot y\right) + 1 \cdot \left(x + y\right)
double f(double x, double y, double z) {
        double r43323 = x;
        double r43324 = y;
        double r43325 = r43323 + r43324;
        double r43326 = z;
        double r43327 = 1.0;
        double r43328 = r43326 + r43327;
        double r43329 = r43325 * r43328;
        return r43329;
}

double f(double x, double y, double z) {
        double r43330 = z;
        double r43331 = x;
        double r43332 = r43330 * r43331;
        double r43333 = y;
        double r43334 = r43330 * r43333;
        double r43335 = r43332 + r43334;
        double r43336 = 1.0;
        double r43337 = r43331 + r43333;
        double r43338 = r43336 * r43337;
        double r43339 = r43335 + r43338;
        return r43339;
}

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. Final simplification0.0

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

Reproduce

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