Average Error: 0.0 → 0.0
Time: 10.4s
Precision: 64
\[\left(x + y\right) \cdot \left(1 - z\right)\]
\[1 \cdot \left(x + y\right) + \left(-\left(x \cdot z + y \cdot z\right)\right)\]
\left(x + y\right) \cdot \left(1 - z\right)
1 \cdot \left(x + y\right) + \left(-\left(x \cdot z + y \cdot z\right)\right)
double f(double x, double y, double z) {
        double r62850 = x;
        double r62851 = y;
        double r62852 = r62850 + r62851;
        double r62853 = 1.0;
        double r62854 = z;
        double r62855 = r62853 - r62854;
        double r62856 = r62852 * r62855;
        return r62856;
}

double f(double x, double y, double z) {
        double r62857 = 1.0;
        double r62858 = x;
        double r62859 = y;
        double r62860 = r62858 + r62859;
        double r62861 = r62857 * r62860;
        double r62862 = z;
        double r62863 = r62858 * r62862;
        double r62864 = r62859 * r62862;
        double r62865 = r62863 + r62864;
        double r62866 = -r62865;
        double r62867 = r62861 + r62866;
        return r62867;
}

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 \color{blue}{1 \cdot \left(x + y\right)} + \left(x + y\right) \cdot \left(-z\right)\]
  6. Simplified0.0

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

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

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

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

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

Reproduce

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