Average Error: 3.4 → 3.4
Time: 33.7s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\left(1 - z \cdot y\right) \cdot x\]
x \cdot \left(1 - y \cdot z\right)
\left(1 - z \cdot y\right) \cdot x
double f(double x, double y, double z) {
        double r13935005 = x;
        double r13935006 = 1.0;
        double r13935007 = y;
        double r13935008 = z;
        double r13935009 = r13935007 * r13935008;
        double r13935010 = r13935006 - r13935009;
        double r13935011 = r13935005 * r13935010;
        return r13935011;
}

double f(double x, double y, double z) {
        double r13935012 = 1.0;
        double r13935013 = z;
        double r13935014 = y;
        double r13935015 = r13935013 * r13935014;
        double r13935016 = r13935012 - r13935015;
        double r13935017 = x;
        double r13935018 = r13935016 * r13935017;
        return r13935018;
}

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 3.4

    \[x \cdot \left(1 - y \cdot z\right)\]
  2. Using strategy rm
  3. Applied *-commutative3.4

    \[\leadsto \color{blue}{\left(1 - y \cdot z\right) \cdot x}\]
  4. Final simplification3.4

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

Reproduce

herbie shell --seed 2019168 
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
  (* x (- 1.0 (* y z))))