Average Error: 3.5 → 0.4
Time: 41.2s
Precision: 64
\[x \cdot \left(1.0 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -6.149463457675146 \cdot 10^{+185}:\\ \;\;\;\;1.0 \cdot x + \left(-\left(x \cdot z\right) \cdot y\right)\\ \mathbf{elif}\;y \cdot z \le 1.1429619896661653 \cdot 10^{+135}:\\ \;\;\;\;\left(1.0 - y \cdot z\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;1.0 \cdot x + \left(-\left(x \cdot z\right) \cdot y\right)\\ \end{array}\]
x \cdot \left(1.0 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -6.149463457675146 \cdot 10^{+185}:\\
\;\;\;\;1.0 \cdot x + \left(-\left(x \cdot z\right) \cdot y\right)\\

\mathbf{elif}\;y \cdot z \le 1.1429619896661653 \cdot 10^{+135}:\\
\;\;\;\;\left(1.0 - y \cdot z\right) \cdot x\\

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

\end{array}
double f(double x, double y, double z) {
        double r16718130 = x;
        double r16718131 = 1.0;
        double r16718132 = y;
        double r16718133 = z;
        double r16718134 = r16718132 * r16718133;
        double r16718135 = r16718131 - r16718134;
        double r16718136 = r16718130 * r16718135;
        return r16718136;
}

double f(double x, double y, double z) {
        double r16718137 = y;
        double r16718138 = z;
        double r16718139 = r16718137 * r16718138;
        double r16718140 = -6.149463457675146e+185;
        bool r16718141 = r16718139 <= r16718140;
        double r16718142 = 1.0;
        double r16718143 = x;
        double r16718144 = r16718142 * r16718143;
        double r16718145 = r16718143 * r16718138;
        double r16718146 = r16718145 * r16718137;
        double r16718147 = -r16718146;
        double r16718148 = r16718144 + r16718147;
        double r16718149 = 1.1429619896661653e+135;
        bool r16718150 = r16718139 <= r16718149;
        double r16718151 = r16718142 - r16718139;
        double r16718152 = r16718151 * r16718143;
        double r16718153 = r16718150 ? r16718152 : r16718148;
        double r16718154 = r16718141 ? r16718148 : r16718153;
        return r16718154;
}

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) < -6.149463457675146e+185 or 1.1429619896661653e+135 < (* y z)

    1. Initial program 20.6

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

      \[\leadsto x \cdot \color{blue}{\left(1.0 + \left(-y \cdot z\right)\right)}\]
    4. Applied distribute-rgt-in20.6

      \[\leadsto \color{blue}{1.0 \cdot x + \left(-y \cdot z\right) \cdot x}\]
    5. Using strategy rm
    6. Applied distribute-lft-neg-in20.6

      \[\leadsto 1.0 \cdot x + \color{blue}{\left(\left(-y\right) \cdot z\right)} \cdot x\]
    7. Applied associate-*l*2.0

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

    if -6.149463457675146e+185 < (* y z) < 1.1429619896661653e+135

    1. Initial program 0.1

      \[x \cdot \left(1.0 - y \cdot z\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -6.149463457675146 \cdot 10^{+185}:\\ \;\;\;\;1.0 \cdot x + \left(-\left(x \cdot z\right) \cdot y\right)\\ \mathbf{elif}\;y \cdot z \le 1.1429619896661653 \cdot 10^{+135}:\\ \;\;\;\;\left(1.0 - y \cdot z\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;1.0 \cdot x + \left(-\left(x \cdot z\right) \cdot y\right)\\ \end{array}\]

Reproduce

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