Average Error: 3.4 → 0.2
Time: 12.1s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -2.316657533313902342261040936204101994876 \cdot 10^{216} \lor \neg \left(y \cdot z \le 4.106418830119920176371277439794922661684 \cdot 10^{205}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - 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 -2.316657533313902342261040936204101994876 \cdot 10^{216} \lor \neg \left(y \cdot z \le 4.106418830119920176371277439794922661684 \cdot 10^{205}\right):\\
\;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r259099 = x;
        double r259100 = 1.0;
        double r259101 = y;
        double r259102 = z;
        double r259103 = r259101 * r259102;
        double r259104 = r259100 - r259103;
        double r259105 = r259099 * r259104;
        return r259105;
}

double f(double x, double y, double z) {
        double r259106 = y;
        double r259107 = z;
        double r259108 = r259106 * r259107;
        double r259109 = -2.3166575333139023e+216;
        bool r259110 = r259108 <= r259109;
        double r259111 = 4.10641883011992e+205;
        bool r259112 = r259108 <= r259111;
        double r259113 = !r259112;
        bool r259114 = r259110 || r259113;
        double r259115 = x;
        double r259116 = 1.0;
        double r259117 = r259115 * r259116;
        double r259118 = r259115 * r259106;
        double r259119 = -r259107;
        double r259120 = r259118 * r259119;
        double r259121 = r259117 + r259120;
        double r259122 = r259116 - r259108;
        double r259123 = r259122 * r259115;
        double r259124 = r259114 ? r259121 : r259123;
        return r259124;
}

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.3166575333139023e+216 or 4.10641883011992e+205 < (* y z)

    1. Initial program 28.7

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

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

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

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

    if -2.3166575333139023e+216 < (* y z) < 4.10641883011992e+205

    1. Initial program 0.1

      \[x \cdot \left(1 - 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.316657533313902342261040936204101994876 \cdot 10^{216} \lor \neg \left(y \cdot z \le 4.106418830119920176371277439794922661684 \cdot 10^{205}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - y \cdot z\right) \cdot x\\ \end{array}\]

Reproduce

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