Average Error: 3.4 → 3.4
Time: 6.6s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\left(1 - y \cdot z\right) \cdot x\]
x \cdot \left(1 - y \cdot z\right)
\left(1 - y \cdot z\right) \cdot x
double f(double x, double y, double z) {
        double r215063 = x;
        double r215064 = 1.0;
        double r215065 = y;
        double r215066 = z;
        double r215067 = r215065 * r215066;
        double r215068 = r215064 - r215067;
        double r215069 = r215063 * r215068;
        return r215069;
}

double f(double x, double y, double z) {
        double r215070 = 1.0;
        double r215071 = y;
        double r215072 = z;
        double r215073 = r215071 * r215072;
        double r215074 = r215070 - r215073;
        double r215075 = x;
        double r215076 = r215074 * r215075;
        return r215076;
}

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. Split input into 2 regimes
  2. if (* y z) < -2.7671125874753415e+189 or 6.779263615680003e+271 < (* y z)

    1. Initial program 31.3

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

      \[\leadsto x \cdot \color{blue}{\left(1 + \left(-y \cdot z\right)\right)}\]
    4. Applied distribute-lft-in31.3

      \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-y \cdot z\right)}\]
    5. Using strategy rm
    6. Applied distribute-lft-neg-in31.3

      \[\leadsto x \cdot 1 + x \cdot \color{blue}{\left(\left(-y\right) \cdot z\right)}\]
    7. Applied associate-*r*1.1

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

    if -2.7671125874753415e+189 < (* y z) < 6.779263615680003e+271

    1. Initial program 0.1

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

      \[\leadsto x \cdot \color{blue}{\left(1 + \left(-y \cdot z\right)\right)}\]
    4. Applied distribute-lft-in0.1

      \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-y \cdot z\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification3.4

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

Reproduce

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