Average Error: 0.0 → 0.0
Time: 7.9s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[\left(x + y\right) \cdot 1 + \left(-\left(z \cdot x + y \cdot z\right)\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
\left(x + y\right) \cdot 1 + \left(-\left(z \cdot x + y \cdot z\right)\right)
double f(double x, double y, double z) {
        double r40325 = x;
        double r40326 = y;
        double r40327 = r40325 + r40326;
        double r40328 = 1.0;
        double r40329 = z;
        double r40330 = r40328 - r40329;
        double r40331 = r40327 * r40330;
        return r40331;
}

double f(double x, double y, double z) {
        double r40332 = x;
        double r40333 = y;
        double r40334 = r40332 + r40333;
        double r40335 = 1.0;
        double r40336 = r40334 * r40335;
        double r40337 = z;
        double r40338 = r40337 * r40332;
        double r40339 = r40333 * r40337;
        double r40340 = r40338 + r40339;
        double r40341 = -r40340;
        double r40342 = r40336 + r40341;
        return r40342;
}

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. Using strategy rm
  7. Applied distribute-lft-in0.0

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

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

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

Reproduce

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