Average Error: 0.0 → 0.0
Time: 13.1s
Precision: 64
\[\left(x + y\right) \cdot \left(1.0 - z\right)\]
\[\left(x + y\right) \cdot 1.0 + \left(-\left(y \cdot z + z \cdot x\right)\right)\]
\left(x + y\right) \cdot \left(1.0 - z\right)
\left(x + y\right) \cdot 1.0 + \left(-\left(y \cdot z + z \cdot x\right)\right)
double f(double x, double y, double z) {
        double r742859 = x;
        double r742860 = y;
        double r742861 = r742859 + r742860;
        double r742862 = 1.0;
        double r742863 = z;
        double r742864 = r742862 - r742863;
        double r742865 = r742861 * r742864;
        return r742865;
}

double f(double x, double y, double z) {
        double r742866 = x;
        double r742867 = y;
        double r742868 = r742866 + r742867;
        double r742869 = 1.0;
        double r742870 = r742868 * r742869;
        double r742871 = z;
        double r742872 = r742867 * r742871;
        double r742873 = r742871 * r742866;
        double r742874 = r742872 + r742873;
        double r742875 = -r742874;
        double r742876 = r742870 + r742875;
        return r742876;
}

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 distribute-rgt-in0.0

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

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

Reproduce

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