Average Error: 3.2 → 3.2
Time: 13.5s
Precision: 64
\[x \cdot \left(1.0 - y \cdot z\right)\]
\[\left(1.0 - z \cdot y\right) \cdot x\]
x \cdot \left(1.0 - y \cdot z\right)
\left(1.0 - z \cdot y\right) \cdot x
double f(double x, double y, double z) {
        double r12385002 = x;
        double r12385003 = 1.0;
        double r12385004 = y;
        double r12385005 = z;
        double r12385006 = r12385004 * r12385005;
        double r12385007 = r12385003 - r12385006;
        double r12385008 = r12385002 * r12385007;
        return r12385008;
}

double f(double x, double y, double z) {
        double r12385009 = 1.0;
        double r12385010 = z;
        double r12385011 = y;
        double r12385012 = r12385010 * r12385011;
        double r12385013 = r12385009 - r12385012;
        double r12385014 = x;
        double r12385015 = r12385013 * r12385014;
        return r12385015;
}

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.2

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

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

    \[\leadsto \left(1.0 - 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))))