Average Error: 0.0 → 0.0
Time: 36.0s
Precision: 64
\[\left(x + y\right) \cdot \left(1.0 - z\right)\]
\[\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1.0\]
\left(x + y\right) \cdot \left(1.0 - z\right)
\left(-z\right) \cdot \left(y + x\right) + \left(y + x\right) \cdot 1.0
double f(double x, double y, double z) {
        double r2541965 = x;
        double r2541966 = y;
        double r2541967 = r2541965 + r2541966;
        double r2541968 = 1.0;
        double r2541969 = z;
        double r2541970 = r2541968 - r2541969;
        double r2541971 = r2541967 * r2541970;
        return r2541971;
}

double f(double x, double y, double z) {
        double r2541972 = z;
        double r2541973 = -r2541972;
        double r2541974 = y;
        double r2541975 = x;
        double r2541976 = r2541974 + r2541975;
        double r2541977 = r2541973 * r2541976;
        double r2541978 = 1.0;
        double r2541979 = r2541976 * r2541978;
        double r2541980 = r2541977 + r2541979;
        return r2541980;
}

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-lft-in0.0

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

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

Reproduce

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