Average Error: 3.2 → 0.1
Time: 2.3s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z = -\infty \lor \neg \left(y \cdot z \le 4.46375759606627534 \cdot 10^{301}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + 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 = -\infty \lor \neg \left(y \cdot z \le 4.46375759606627534 \cdot 10^{301}\right):\\
\;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r238844 = x;
        double r238845 = 1.0;
        double r238846 = y;
        double r238847 = z;
        double r238848 = r238846 * r238847;
        double r238849 = r238845 - r238848;
        double r238850 = r238844 * r238849;
        return r238850;
}

double f(double x, double y, double z) {
        double r238851 = y;
        double r238852 = z;
        double r238853 = r238851 * r238852;
        double r238854 = -inf.0;
        bool r238855 = r238853 <= r238854;
        double r238856 = 4.463757596066275e+301;
        bool r238857 = r238853 <= r238856;
        double r238858 = !r238857;
        bool r238859 = r238855 || r238858;
        double r238860 = x;
        double r238861 = 1.0;
        double r238862 = r238860 * r238861;
        double r238863 = r238860 * r238851;
        double r238864 = -r238852;
        double r238865 = r238863 * r238864;
        double r238866 = r238862 + r238865;
        double r238867 = -r238853;
        double r238868 = r238860 * r238867;
        double r238869 = r238862 + r238868;
        double r238870 = r238859 ? r238866 : r238869;
        return r238870;
}

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) < -inf.0 or 4.463757596066275e+301 < (* y z)

    1. Initial program 63.2

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

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

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

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

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

    if -inf.0 < (* y z) < 4.463757596066275e+301

    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 simplification0.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z = -\infty \lor \neg \left(y \cdot z \le 4.46375759606627534 \cdot 10^{301}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \end{array}\]

Reproduce

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