Average Error: 3.5 → 0.2
Time: 8.4s
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 3.802707540993622449008450959586743542306 \cdot 10^{221}\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 = -\infty \lor \neg \left(y \cdot z \le 3.802707540993622449008450959586743542306 \cdot 10^{221}\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 r180874 = x;
        double r180875 = 1.0;
        double r180876 = y;
        double r180877 = z;
        double r180878 = r180876 * r180877;
        double r180879 = r180875 - r180878;
        double r180880 = r180874 * r180879;
        return r180880;
}

double f(double x, double y, double z) {
        double r180881 = y;
        double r180882 = z;
        double r180883 = r180881 * r180882;
        double r180884 = -inf.0;
        bool r180885 = r180883 <= r180884;
        double r180886 = 3.8027075409936224e+221;
        bool r180887 = r180883 <= r180886;
        double r180888 = !r180887;
        bool r180889 = r180885 || r180888;
        double r180890 = 1.0;
        double r180891 = x;
        double r180892 = r180890 * r180891;
        double r180893 = -r180882;
        double r180894 = r180891 * r180893;
        double r180895 = r180881 * r180894;
        double r180896 = r180892 + r180895;
        double r180897 = -r180883;
        double r180898 = r180897 * r180891;
        double r180899 = r180892 + r180898;
        double r180900 = r180889 ? r180896 : r180899;
        return r180900;
}

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 3.8027075409936224e+221 < (* y z)

    1. Initial program 44.0

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

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

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

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

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

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

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

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

    if -inf.0 < (* y z) < 3.8027075409936224e+221

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z = -\infty \lor \neg \left(y \cdot z \le 3.802707540993622449008450959586743542306 \cdot 10^{221}\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 2019305 
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
  :precision binary64
  (* x (- 1 (* y z))))