Average Error: 0.0 → 0.0
Time: 6.4s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(x + y\right) \cdot 1 + \left(-z\right) \cdot \left(x + y\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(x + y\right) \cdot 1 + \left(-z\right) \cdot \left(x + y\right)
double f(double x, double y, double z) {
        double r54448 = x;
        double r54449 = y;
        double r54450 = r54448 + r54449;
        double r54451 = 1.0;
        double r54452 = z;
        double r54453 = r54451 - r54452;
        double r54454 = r54450 * r54453;
        return r54454;
}

double f(double x, double y, double z) {
        double r54455 = x;
        double r54456 = y;
        double r54457 = r54455 + r54456;
        double r54458 = 1.0;
        double r54459 = r54457 * r54458;
        double r54460 = z;
        double r54461 = -r54460;
        double r54462 = r54461 * r54457;
        double r54463 = r54459 + r54462;
        return r54463;
}

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

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

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

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

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

Reproduce

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