Average Error: 3.4 → 0.2
Time: 12.3s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -1.01053877729367452 \cdot 10^{256} \lor \neg \left(y \cdot z \le 8.8081894731625367 \cdot 10^{223}\right):\\ \;\;\;\;1 \cdot x + \left(-x \cdot y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x + x \cdot \left(-y \cdot z\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -1.01053877729367452 \cdot 10^{256} \lor \neg \left(y \cdot z \le 8.8081894731625367 \cdot 10^{223}\right):\\
\;\;\;\;1 \cdot x + \left(-x \cdot y\right) \cdot z\\

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

\end{array}
double f(double x, double y, double z) {
        double r288882 = x;
        double r288883 = 1.0;
        double r288884 = y;
        double r288885 = z;
        double r288886 = r288884 * r288885;
        double r288887 = r288883 - r288886;
        double r288888 = r288882 * r288887;
        return r288888;
}

double f(double x, double y, double z) {
        double r288889 = y;
        double r288890 = z;
        double r288891 = r288889 * r288890;
        double r288892 = -1.0105387772936745e+256;
        bool r288893 = r288891 <= r288892;
        double r288894 = 8.808189473162537e+223;
        bool r288895 = r288891 <= r288894;
        double r288896 = !r288895;
        bool r288897 = r288893 || r288896;
        double r288898 = 1.0;
        double r288899 = x;
        double r288900 = r288898 * r288899;
        double r288901 = r288899 * r288889;
        double r288902 = -r288901;
        double r288903 = r288902 * r288890;
        double r288904 = r288900 + r288903;
        double r288905 = -r288891;
        double r288906 = r288899 * r288905;
        double r288907 = r288900 + r288906;
        double r288908 = r288897 ? r288904 : r288907;
        return r288908;
}

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.0105387772936745e+256 or 8.808189473162537e+223 < (* y z)

    1. Initial program 35.4

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

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

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

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

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

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

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

    if -1.0105387772936745e+256 < (* y z) < 8.808189473162537e+223

    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)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -1.01053877729367452 \cdot 10^{256} \lor \neg \left(y \cdot z \le 8.8081894731625367 \cdot 10^{223}\right):\\ \;\;\;\;1 \cdot x + \left(-x \cdot y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x + x \cdot \left(-y \cdot z\right)\\ \end{array}\]

Reproduce

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