Average Error: 3.2 → 3.2
Time: 3.1s
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 r133143 = x;
        double r133144 = 1.0;
        double r133145 = y;
        double r133146 = z;
        double r133147 = r133145 * r133146;
        double r133148 = r133144 - r133147;
        double r133149 = r133143 * r133148;
        return r133149;
}

double f(double x, double y, double z) {
        double r133150 = 1.0;
        double r133151 = y;
        double r133152 = z;
        double r133153 = r133151 * r133152;
        double r133154 = r133150 - r133153;
        double r133155 = x;
        double r133156 = r133154 * r133155;
        return r133156;
}

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) < -1.2845896501415564e+259 or 1.6091914695495064e+270 < (* y z)

    1. Initial program 44.7

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

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

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

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

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

    if -1.2845896501415564e+259 < (* y z) < 1.6091914695495064e+270

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

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

Reproduce

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