Average Error: 3.3 → 0.3
Time: 7.7s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -1.244764226799670696728061941145467288721 \cdot 10^{262} \lor \neg \left(y \cdot z \le 3.041763291070711193188000667575331746712 \cdot 10^{161}\right):\\ \;\;\;\;1 \cdot x + y \cdot \left(x \cdot \left(-z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x + \left(-y \cdot z\right) \cdot x\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -1.244764226799670696728061941145467288721 \cdot 10^{262} \lor \neg \left(y \cdot z \le 3.041763291070711193188000667575331746712 \cdot 10^{161}\right):\\
\;\;\;\;1 \cdot x + y \cdot \left(x \cdot \left(-z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;1 \cdot x + \left(-y \cdot z\right) \cdot x\\

\end{array}
double f(double x, double y, double z) {
        double r200559 = x;
        double r200560 = 1.0;
        double r200561 = y;
        double r200562 = z;
        double r200563 = r200561 * r200562;
        double r200564 = r200560 - r200563;
        double r200565 = r200559 * r200564;
        return r200565;
}

double f(double x, double y, double z) {
        double r200566 = y;
        double r200567 = z;
        double r200568 = r200566 * r200567;
        double r200569 = -1.2447642267996707e+262;
        bool r200570 = r200568 <= r200569;
        double r200571 = 3.041763291070711e+161;
        bool r200572 = r200568 <= r200571;
        double r200573 = !r200572;
        bool r200574 = r200570 || r200573;
        double r200575 = 1.0;
        double r200576 = x;
        double r200577 = r200575 * r200576;
        double r200578 = -r200567;
        double r200579 = r200576 * r200578;
        double r200580 = r200566 * r200579;
        double r200581 = r200577 + r200580;
        double r200582 = -r200568;
        double r200583 = r200582 * r200576;
        double r200584 = r200577 + r200583;
        double r200585 = r200574 ? r200581 : r200584;
        return r200585;
}

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.2447642267996707e+262 or 3.041763291070711e+161 < (* y z)

    1. Initial program 29.0

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

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

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

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

      \[\leadsto 1 \cdot x + \color{blue}{\left(-y \cdot z\right) \cdot x}\]
    7. Using strategy rm
    8. Applied distribute-rgt-neg-in29.0

      \[\leadsto 1 \cdot x + \color{blue}{\left(y \cdot \left(-z\right)\right)} \cdot x\]
    9. Applied associate-*l*2.0

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

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

    if -1.2447642267996707e+262 < (* y z) < 3.041763291070711e+161

    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)}\]
    5. Simplified0.1

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -1.244764226799670696728061941145467288721 \cdot 10^{262} \lor \neg \left(y \cdot z \le 3.041763291070711193188000667575331746712 \cdot 10^{161}\right):\\ \;\;\;\;1 \cdot x + y \cdot \left(x \cdot \left(-z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x + \left(-y \cdot z\right) \cdot x\\ \end{array}\]

Reproduce

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