Average Error: 0.0 → 0.0
Time: 853.0ms
Precision: 64
\[\left(x + y\right) \cdot \left(z + 1\right)\]
\[z \cdot \left(x + y\right) + 1 \cdot \left(x + y\right)\]
\left(x + y\right) \cdot \left(z + 1\right)
z \cdot \left(x + y\right) + 1 \cdot \left(x + y\right)
double f(double x, double y, double z) {
        double r24821 = x;
        double r24822 = y;
        double r24823 = r24821 + r24822;
        double r24824 = z;
        double r24825 = 1.0;
        double r24826 = r24824 + r24825;
        double r24827 = r24823 * r24826;
        return r24827;
}

double f(double x, double y, double z) {
        double r24828 = z;
        double r24829 = x;
        double r24830 = y;
        double r24831 = r24829 + r24830;
        double r24832 = r24828 * r24831;
        double r24833 = 1.0;
        double r24834 = r24833 * r24831;
        double r24835 = r24832 + r24834;
        return r24835;
}

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

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

Reproduce

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