Average Error: 0.0 → 0.0
Time: 2.6s
Precision: 64
\[\left(x + y\right) \cdot \left(z + 1\right)\]
\[z \cdot \left(x + y\right) + \left(x + y\right) \cdot 1\]
\left(x + y\right) \cdot \left(z + 1\right)
z \cdot \left(x + y\right) + \left(x + y\right) \cdot 1
double f(double x, double y, double z) {
        double r28413 = x;
        double r28414 = y;
        double r28415 = r28413 + r28414;
        double r28416 = z;
        double r28417 = 1.0;
        double r28418 = r28416 + r28417;
        double r28419 = r28415 * r28418;
        return r28419;
}

double f(double x, double y, double z) {
        double r28420 = z;
        double r28421 = x;
        double r28422 = y;
        double r28423 = r28421 + r28422;
        double r28424 = r28420 * r28423;
        double r28425 = 1.0;
        double r28426 = r28423 * r28425;
        double r28427 = r28424 + r28426;
        return r28427;
}

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

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

Reproduce

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