Average Error: 3.2 → 2.3
Time: 6.0s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;x \le -2.84689544374018339 \cdot 10^{-224} \lor \neg \left(x \le 1.3866717898654844 \cdot 10^{65}\right):\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;x \le -2.84689544374018339 \cdot 10^{-224} \lor \neg \left(x \le 1.3866717898654844 \cdot 10^{65}\right):\\
\;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r1243 = x;
        double r1244 = 1.0;
        double r1245 = y;
        double r1246 = z;
        double r1247 = r1245 * r1246;
        double r1248 = r1244 - r1247;
        double r1249 = r1243 * r1248;
        return r1249;
}

double f(double x, double y, double z) {
        double r1250 = x;
        double r1251 = -2.8468954437401834e-224;
        bool r1252 = r1250 <= r1251;
        double r1253 = 1.3866717898654844e+65;
        bool r1254 = r1250 <= r1253;
        double r1255 = !r1254;
        bool r1256 = r1252 || r1255;
        double r1257 = 1.0;
        double r1258 = r1250 * r1257;
        double r1259 = y;
        double r1260 = z;
        double r1261 = r1259 * r1260;
        double r1262 = -r1261;
        double r1263 = r1250 * r1262;
        double r1264 = r1258 + r1263;
        double r1265 = r1250 * r1259;
        double r1266 = -r1260;
        double r1267 = r1265 * r1266;
        double r1268 = r1258 + r1267;
        double r1269 = r1256 ? r1264 : r1268;
        return r1269;
}

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 x < -2.8468954437401834e-224 or 1.3866717898654844e+65 < x

    1. Initial program 1.5

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

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

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

    if -2.8468954437401834e-224 < x < 1.3866717898654844e+65

    1. Initial program 5.6

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

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

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

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

      \[\leadsto x \cdot 1 + \color{blue}{\left(x \cdot y\right) \cdot \left(-z\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification2.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -2.84689544374018339 \cdot 10^{-224} \lor \neg \left(x \le 1.3866717898654844 \cdot 10^{65}\right):\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \end{array}\]

Reproduce

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