Average Error: 3.5 → 0.2
Time: 2.2s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -2.132094855217355 \cdot 10^{300} \lor \neg \left(y \cdot z \le 3.38424699368821546 \cdot 10^{194}\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 \le -2.132094855217355 \cdot 10^{300} \lor \neg \left(y \cdot z \le 3.38424699368821546 \cdot 10^{194}\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 r259851 = x;
        double r259852 = 1.0;
        double r259853 = y;
        double r259854 = z;
        double r259855 = r259853 * r259854;
        double r259856 = r259852 - r259855;
        double r259857 = r259851 * r259856;
        return r259857;
}

double f(double x, double y, double z) {
        double r259858 = y;
        double r259859 = z;
        double r259860 = r259858 * r259859;
        double r259861 = -2.132094855217355e+300;
        bool r259862 = r259860 <= r259861;
        double r259863 = 3.3842469936882155e+194;
        bool r259864 = r259860 <= r259863;
        double r259865 = !r259864;
        bool r259866 = r259862 || r259865;
        double r259867 = x;
        double r259868 = 1.0;
        double r259869 = r259867 * r259868;
        double r259870 = r259867 * r259858;
        double r259871 = -r259859;
        double r259872 = r259870 * r259871;
        double r259873 = r259869 + r259872;
        double r259874 = -r259860;
        double r259875 = r259867 * r259874;
        double r259876 = r259869 + r259875;
        double r259877 = r259866 ? r259873 : r259876;
        return r259877;
}

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) < -2.132094855217355e+300 or 3.3842469936882155e+194 < (* y z)

    1. Initial program 36.0

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

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

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

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

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

    if -2.132094855217355e+300 < (* y z) < 3.3842469936882155e+194

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

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