Average Error: 0.0 → 0.0
Time: 14.1s
Precision: 64
\[\left(x + y\right) \cdot \left(1.0 - z\right)\]
\[\left(z \cdot \left(-y\right) + \left(x + y\right) \cdot 1.0\right) + \left(-x\right) \cdot z\]
\left(x + y\right) \cdot \left(1.0 - z\right)
\left(z \cdot \left(-y\right) + \left(x + y\right) \cdot 1.0\right) + \left(-x\right) \cdot z
double f(double x, double y, double z) {
        double r2195353 = x;
        double r2195354 = y;
        double r2195355 = r2195353 + r2195354;
        double r2195356 = 1.0;
        double r2195357 = z;
        double r2195358 = r2195356 - r2195357;
        double r2195359 = r2195355 * r2195358;
        return r2195359;
}

double f(double x, double y, double z) {
        double r2195360 = z;
        double r2195361 = y;
        double r2195362 = -r2195361;
        double r2195363 = r2195360 * r2195362;
        double r2195364 = x;
        double r2195365 = r2195364 + r2195361;
        double r2195366 = 1.0;
        double r2195367 = r2195365 * r2195366;
        double r2195368 = r2195363 + r2195367;
        double r2195369 = -r2195364;
        double r2195370 = r2195369 * r2195360;
        double r2195371 = r2195368 + r2195370;
        return r2195371;
}

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(1.0 - z\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto \left(x + y\right) \cdot \color{blue}{\left(1.0 + \left(-z\right)\right)}\]
  4. Applied distribute-rgt-in0.0

    \[\leadsto \color{blue}{1.0 \cdot \left(x + y\right) + \left(-z\right) \cdot \left(x + y\right)}\]
  5. Using strategy rm
  6. Applied +-commutative0.0

    \[\leadsto 1.0 \cdot \left(x + y\right) + \left(-z\right) \cdot \color{blue}{\left(y + x\right)}\]
  7. Applied distribute-rgt-in0.0

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

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

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

Reproduce

herbie shell --seed 2019158 
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, H"
  (* (+ x y) (- 1.0 z)))